From d04e808277b52fa3e47c8832b7cf5ecfed3edf82 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 28 Nov 2010 20:27:53 -0500 Subject: [PATCH] Unbreak sysctl handling. --- etc/inc/globals.inc | 2 +- etc/inc/system.inc | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index bc3eed77f4..bab448d61e 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -167,4 +167,4 @@ $sysctls = array("net.inet.ip.portrange.first" => "1024", $config_parsed = false; -?> +?> \ No newline at end of file diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 97096c43c6..dcc8df6920 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -52,9 +52,10 @@ function activate_powerd() { function get_default_sysctl_value($id) { global $sysctls; - - if (isset($sysctls[$id])) - return $value; + foreach($sysctls as $sysctl => $value) { + if($sysctl == $id) + return $value; + } } function activate_sysctls() { @@ -1479,4 +1480,4 @@ function system_get_dmesg_boot() { return file_get_contents("{$g['varlog_path']}/dmesg.boot"); } -?> +?> \ No newline at end of file