summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/crontab1
-rwxr-xr-xetc/rc.newwanip9
2 files changed, 8 insertions, 2 deletions
diff --git a/etc/crontab b/etc/crontab
index c83ebb3..9cd5032 100644
--- a/etc/crontab
+++ b/etc/crontab
@@ -11,4 +11,3 @@ HOME=/var/log
*/60 * * * * root /usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 virusprot
*/60 * * * * root /usr/bin/nice -n20 /usr/local/sbin/expiretable -t 1800 snort2c
*/60 * * * * root /usr/bin/nice -n20 /usr/local/sbin/expiretable -t 1800 snort2c
-*/360 * * * * root /usr/bin/nice -n20 /etc/rc.dhclient_cron
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index 46b4a41..569f930 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -49,7 +49,14 @@ if($argument <> "") {
$curwanip = get_current_wan_address();
} else {
$curwanip = get_current_wan_address();
- $interface = "wan";
+ $interface = $config['interfaces']['wan']['if'];
+}
+
+if($curwanip == "0.0.0.0") {
+ log_error("Failed to update WAN IP, restarting dhclient.");
+ exec("dhclient {$interface}");
+ /* die now, dhclient will kick off rc.newwanip again? */
+ exit;
}
/* grab the prior ip for pftpx tests */
OpenPOWER on IntegriCloud