From b089ad3aa0e3e774c1b5820b8ae2ae978df527b5 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 20 Aug 2009 00:25:00 -0400 Subject: Do not sleep if /var/run/donotsleep_bogons exists. For some reason the first argument is not being passed when ran from webConfigurator --- etc/rc.update_bogons.sh | 4 +++- usr/local/www/diag_showbogons.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh index 19e2df6..980d047 100755 --- a/etc/rc.update_bogons.sh +++ b/etc/rc.update_bogons.sh @@ -11,7 +11,9 @@ value=`od -A n -d -N2 /dev/random | awk '{ print $1 }'` # Sleep for that time, unless an argument is specified. if [ "$1" = "" ]; then - echo "rc.update_bogons.sh is sleeping for $value" | logger + if [ ! -f /var/run/donotsleep_bogons ]; then + echo "rc.update_bogons.sh is sleeping for $value" | logger + fi sleep $value fi diff --git a/usr/local/www/diag_showbogons.php b/usr/local/www/diag_showbogons.php index 9b22b95..5ee9055 100644 --- a/usr/local/www/diag_showbogons.php +++ b/usr/local/www/diag_showbogons.php @@ -37,7 +37,9 @@ require("guiconfig.inc"); if($_POST['Download']) { + exec("touch /var/run/donotsleep_bogons"); exec("/etc/rc.update_bogons.sh donotsleep"); + exec("rm /var/run/donotsleep_bogons"); } $bogons = `cat /etc/bogons`; -- cgit v1.1