summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-03-27 21:36:46 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-03-27 21:36:46 +0000
commitd6d0ac8b7b27366839bb83d943d22764c6aa36f1 (patch)
tree54738e57fa51ad786c14abe96bbd1072112bc30f /etc
parent0711d73f04f367873888bcb000a7901602c7b14f (diff)
downloadpfsense-d6d0ac8b7b27366839bb83d943d22764c6aa36f1.zip
pfsense-d6d0ac8b7b27366839bb83d943d22764c6aa36f1.tar.gz
Use intval() on shell command which contains a c/r
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 51cdce2..03297ff 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -94,7 +94,7 @@ function filter_configure_sync() {
$time_based_rules = true;
}
if($time_based_rules == true) {
- $status =`kldstat | grep ipfw | wc -l | awk '{ print $1 }'`;
+ $status = intval(`kldstat | grep ipfw | wc -l | awk '{ print $1 }'`);
if($status < 1)
mwexec("/sbin/kldload ipfw");
}
@@ -270,8 +270,12 @@ function filter_configure_sync() {
}
/* if time based rules are enabled then swap in the set */
- if($time_based_rules == true)
+ if($time_based_rules == true) {
+ $status = intval(`ps awux | grep -v grep | grep minicron | grep filter_configure_sync | wc -l | awk '{ print $1 }'`);
+ if($status == "0")
+ exec("/usr/local/bin/minicron 900 /etc/rc.filter_configure_sync");
tdr_install_set();
+ }
/*
we need a way to let a user run a shell cmd after each
OpenPOWER on IntegriCloud