summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-14 16:56:41 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-14 16:56:41 +0000
commit0f1b537066dc15354b868092488481d81c4e6472 (patch)
treef79668b358a49348eb352da07d2f2cf1e895423b
parent3cb6ab8843b500a07b2984b3c964a2ae0d4f5c9e (diff)
downloadpfsense-0f1b537066dc15354b868092488481d81c4e6472.zip
pfsense-0f1b537066dc15354b868092488481d81c4e6472.tar.gz
Down the interface in question. DHCLIENT should exit gracefully afterwards and if not, kill it!
-rw-r--r--etc/inc/interfaces.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index bde5689..fe41753 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -623,7 +623,7 @@ function interfaces_opt_dhcp_configure($interface) {
if ($optcfg['dhcphostname']) {
$dhclientconf .= <<<EOD
-interface "{$optcfg['if']}" {
+ interface "{$optcfg['if']}" {
send dhcp-client-identifier "{$optcfg['dhcphostname']}";
send host-name "{$optcfg['dhcphostname']}";
script "/sbin/dhclient-script";
@@ -637,7 +637,7 @@ EOD;
$optif = $optcfg['if'];
- /* bring wan interface up before starting dhclient */
+ /* bring interface up before starting dhclient */
mwexec("/sbin/ifconfig {$optif} up");
/* fire up dhclient */
@@ -744,11 +744,11 @@ function interfaces_dhcp_down($interface) {
global $config;
$wancfg = $config['interfaces']['wan'];
$wanif = $wancfg['if'];
- mwexec("/sbin/ifconfig {$interface} delete");
+ mwexec("/sbin/ifconfig {$interface} down");
+ sleep(1);
$pid_dhclient = `ps awux | grep dhclient | grep {$interface}`;
if($pid_dhclient)
mwexec("kill {$pid_dhclient}");
- sleep(1);
}
function interfaces_dhcp_up($interface) {
OpenPOWER on IntegriCloud