diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-12-16 01:37:04 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-12-16 01:37:04 +0000 |
commit | b1f7e75e2a96f4783a81e3323adf2bdffe899663 (patch) | |
tree | 9de198d5f2d97b12e5ac975243d04ea60846e998 /etc/rc.newwanip | |
parent | 716d68e31e82057bafcd143528140923fcf9b43d (diff) | |
download | pfsense-b1f7e75e2a96f4783a81e3323adf2bdffe899663.zip pfsense-b1f7e75e2a96f4783a81e3323adf2bdffe899663.tar.gz |
Revert previous dhclient crontab mojo. When running rc.newwanip if the ip == 0.0.0.0 then fire off dhclient again.
As seen on the forums ( http://forum.pfsense.org/index.php/topic,2645.0/topicseen.html )
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-x | etc/rc.newwanip | 9 |
1 files changed, 8 insertions, 1 deletions
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 */ |