From 6df9d7e359dcf471d3afc24bcca8a2926376224f Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 26 May 2007 22:00:36 +0000 Subject: Add system tunables area which allows the user to fine control sysctl's. --- etc/inc/system.inc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'etc') 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(); } -- cgit v1.1