mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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 )
This commit is contained in:
parent
716d68e31e
commit
b1f7e75e2a
@ -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
|
||||
|
||||
@ -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 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user