summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.update_bogons.sh11
-rw-r--r--usr/local/www/diag_showbogons.php7
2 files changed, 6 insertions, 12 deletions
diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh
index 332aeb7..d07cfb9 100755
--- a/etc/rc.update_bogons.sh
+++ b/etc/rc.update_bogons.sh
@@ -7,13 +7,12 @@
echo "rc.update_bogons.sh is starting up." | logger
# Sleep for that time, unless an argument is specified.
+
if [ "$1" = "" ]; then
- if [ ! -f /var/run/donotsleep_bogons ]; then
- # Grab a random value
- value=`od -A n -d -N2 /dev/random | awk '{ print $1 }'`
- echo "rc.update_bogons.sh is sleeping for $value" | logger
- sleep $value
- fi
+ # Grab a random value
+ value=`od -A n -d -N2 /dev/random | awk '{ print $1 }'`
+ echo "rc.update_bogons.sh is sleeping for $value" | logger
+ sleep $value
fi
echo "rc.update_bogons.sh is beginning the update cycle." | logger
diff --git a/usr/local/www/diag_showbogons.php b/usr/local/www/diag_showbogons.php
index b8366db..c3ee290 100644
--- a/usr/local/www/diag_showbogons.php
+++ b/usr/local/www/diag_showbogons.php
@@ -37,12 +37,7 @@
require("guiconfig.inc");
if($_POST['Download']) {
- exec("touch /var/run/donotsleep_bogons");
- conf_mount_rw();
- exec("/usr/bin/fetch -q -o /tmp/bogons 'http://files.pfsense.org/bogon-bn-nonagg.txt'");
- if(file_exists("/tmp/bogons"))
- exec("egrep -v '^192.168.0.0/16|^172.16.0.0/12|^10.0.0.0/8' /tmp/bogons > /etc/bogons");
- exec("rm /tmp/bogons");
+ mwexec_bg("/etc/rc.update_bogons.sh now");
}
$bogons = `cat /etc/bogons`;
OpenPOWER on IntegriCloud