summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-26 22:00:36 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-26 22:00:36 +0000
commit6df9d7e359dcf471d3afc24bcca8a2926376224f (patch)
treec4c492f149ab56008f0cdb93b88d248735641843 /etc
parent77daabe4a2869f9100d5fa77f359a71a6f8a0324 (diff)
downloadpfsense-6df9d7e359dcf471d3afc24bcca8a2926376224f.zip
pfsense-6df9d7e359dcf471d3afc24bcca8a2926376224f.tar.gz
Add system tunables area which allows the user to fine control sysctl's.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/system.inc14
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();
}
OpenPOWER on IntegriCloud