diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-07-07 20:06:37 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-07-07 20:06:37 -0300 |
commit | 971de1f98a991a42c448415d34805d2970b86c4f (patch) | |
tree | 3c09598d67f04060af6113153c1995d804fb1244 /etc/rc.bootup | |
parent | 79cd8239ed8dd7d2dd0d86475b62ee25c5d5736d (diff) | |
download | pfsense-971de1f98a991a42c448415d34805d2970b86c4f.zip pfsense-971de1f98a991a42c448415d34805d2970b86c4f.tar.gz |
Convert almost all /sbin/sysctl calls to php functions
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(); |