diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-03-08 00:37:51 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-03-08 00:37:51 +0000 |
commit | ea79cf11620776f1fbcbc2045d020d68646936d6 (patch) | |
tree | 54a0448fadadf207549df6a2b07170efeab86245 /etc | |
parent | 1ab56363bbc910157191850b45d78f9ec98e5099 (diff) | |
download | pfsense-ea79cf11620776f1fbcbc2045d020d68646936d6.zip pfsense-ea79cf11620776f1fbcbc2045d020d68646936d6.tar.gz |
Use the new is_module_loaded function to avoid spamming the System log.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 3 | ||||
-rw-r--r-- | etc/inc/vpn.inc | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index b62cee6..81e7ce3 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -53,8 +53,7 @@ $FilterIflist = array(); function filter_load_ipfw() { - $status = intval(`kldstat | grep ipfw | grep -v "grep" | wc -l | awk '{ print $1 }'`); - if ($status == "0") { + if (!is_module_loaded("ipfw.ko")) { mute_kernel_msgs(); mwexec("/sbin/kldload ipfw"); unmute_kernel_msgs(); diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index a698516..00f4b64 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -1283,7 +1283,8 @@ function vpn_l2tp_configure() { $syscfg = $config['system']; $l2tpcfg = $config['l2tp']; - mwexec("/sbin/kldload /boot/kernel/ng_l2tp.ko"); + if (!is_module_loaded("ng_l2tp.ko")) + mwexec("/sbin/kldload /boot/kernel/ng_l2tp.ko"); /* create directory if it does not exist */ if (!is_dir("{$g['varetc_path']}/l2tp-vpn")) |