diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-05-26 22:00:36 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-05-26 22:00:36 +0000 |
commit | 6df9d7e359dcf471d3afc24bcca8a2926376224f (patch) | |
tree | c4c492f149ab56008f0cdb93b88d248735641843 /etc/inc/system.inc | |
parent | 77daabe4a2869f9100d5fa77f359a71a6f8a0324 (diff) | |
download | pfsense-6df9d7e359dcf471d3afc24bcca8a2926376224f.zip pfsense-6df9d7e359dcf471d3afc24bcca8a2926376224f.tar.gz |
Add system tunables area which allows the user to fine control sysctl's.
Diffstat (limited to 'etc/inc/system.inc')
-rw-r--r-- | etc/inc/system.inc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 8545c06..b9aa8d4 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -32,6 +32,13 @@ /* include all configuration functions */ require_once("functions.inc"); +function activate_sysctls() { + global $config, $g; + foreach ($config['sysctl']['item'] as $tunable) { + mwexec("sysctl " . $tunable['tunable'] . "=\"" . $tunable['value'] . "\""); + } +} + function opcode_cache_configuration() { global $g; if($g['platform'] == "cdrom") @@ -1202,11 +1209,8 @@ function system_setup_sysctl() { echo "system_setup_sysctl() being called $mt\n"; } - $sysctl = return_filename_as_array("/etc/sysctl.conf"); - foreach($sysctl as $sysc) { - if($sysc <> "") - mwexec("sysctl {$sysc} 2>/dev/null"); - } + activate_sysctls(); + if (isset($config['system']['sharednet'])) { system_disable_arp_wrong_if(); } |