diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-12-17 18:04:58 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-12-17 18:04:58 +0000 |
commit | 1cbc2a1c68aa0a125a9c13b620201b7464cd511b (patch) | |
tree | bdda5951a12b4e610a6ec2e3d7d7a81a2fc95eb2 | |
parent | f86e2cf93565e1db982bf5ea736227226b728577 (diff) | |
download | pfsense-1cbc2a1c68aa0a125a9c13b620201b7464cd511b.zip pfsense-1cbc2a1c68aa0a125a9c13b620201b7464cd511b.tar.gz |
Use correct interface when restarting dhclient
-rwxr-xr-x | etc/rc.newwanip | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip index 569f930..d6067a9 100755 --- a/etc/rc.newwanip +++ b/etc/rc.newwanip @@ -45,16 +45,18 @@ $argument = str_replace("\n", "", $argv[1]); if($argument <> "") { $curwanip = find_interface_ip($argument); $interface = convert_real_interface_to_friendly_interface_name($argument); + $interface_real = convert_friendly_interface_to_real_interface_name($argument); if($curwanip == "") $curwanip = get_current_wan_address(); } else { $curwanip = get_current_wan_address(); - $interface = $config['interfaces']['wan']['if']; + $interface = "wan"; + $interface_real = $config['interfaces']['wan']['if']; } if($curwanip == "0.0.0.0") { log_error("Failed to update WAN IP, restarting dhclient."); - exec("dhclient {$interface}"); + exec("dhclient {$interface_real}"); /* die now, dhclient will kick off rc.newwanip again? */ exit; } |