diff options
Diffstat (limited to 'etc/rc.bootup')
-rwxr-xr-x | etc/rc.bootup | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/rc.bootup b/etc/rc.bootup index 815480a..69eb486 100755 --- a/etc/rc.bootup +++ b/etc/rc.bootup @@ -392,16 +392,19 @@ if($config['system']['afterbootupshellcmd'] <> "") { if($physmem < $g['minimum_ram_warning']) { require_once("/etc/inc/notices.inc"); file_notice("{$g['product_name']}MemoryRequirements", "{$g['product_name']} requires at least {$g['minimum_ram_warning_text']} of RAM. Expect unusual performance. This platform is not supported.", "Memory", "", 1); - mwexec("/sbin/sysctl net.inet.tcp.recvspace=4096"); - mwexec("/sbin/sysctl net.inet.tcp.sendspace=4096"); + set_sysctl(array( + "net.inet.tcp.recvspace" => "4096", + "net.inet.tcp.sendspace" => "4096" + )); } /* if we are operating at 1000 then increase timeouts. this was never accounted for after moving to 1000 hz */ -$kern_hz = `/sbin/sysctl kern.clockrate | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d"," -f1`; -$kern_hz = trim($kern_hz, "\r\n"); +$kern_hz = get_single_sysctl('kern.clockrate'); +$kern_hz = substr($kern_hz, strpos($kern_hz, "hz = ") + 5); +$kern_hz = substr($kern_hz, 0, strpos($kern_hz, ",")); if($kern_hz == "1000") - mwexec("/sbin/sysctl net.inet.tcp.rexmit_min=30"); + set_single_sysctl("net.inet.tcp.rexmit_min" , "30"); /* start the igmpproxy daemon */ services_igmpproxy_configure(); |