Do not reload ipfw if it is already loaded.

This commit is contained in:
Scott Ullrich 2007-04-22 22:49:58 +00:00
parent 30566f8f86
commit 54e36b9a00

View File

@ -126,8 +126,11 @@ function filter_configure_sync() {
/* load ipfw / dummynet early on if required */
if($config['system']['dummynetshaper']) {
mwexec("/sbin/kldload ipfw");
mwexec("/sbin/kldload dummynet");
$status = intval(`kldstat | grep ipfw | wc -l | awk '{ print $1 }'`);
if($status == "0") {
mwexec("/sbin/kldload ipfw");
mwexec("/sbin/kldload dummynet");
}
} else {
/* check to see if any rules reference a schedule
* and if so load ipfw for later usage.