summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-12-17 18:04:58 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-12-17 18:04:58 +0000
commit1cbc2a1c68aa0a125a9c13b620201b7464cd511b (patch)
treebdda5951a12b4e610a6ec2e3d7d7a81a2fc95eb2 /etc
parentf86e2cf93565e1db982bf5ea736227226b728577 (diff)
downloadpfsense-1cbc2a1c68aa0a125a9c13b620201b7464cd511b.zip
pfsense-1cbc2a1c68aa0a125a9c13b620201b7464cd511b.tar.gz
Use correct interface when restarting dhclient
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.newwanip6
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;
}
OpenPOWER on IntegriCloud