summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-20 23:12:47 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-20 23:12:47 +0000
commit0521b82d1fccd714939ec1b8ca4c1e186543c467 (patch)
tree997865123a5b72d391de3887773ec6774fc6d74f /etc
parentfc1c20c4715fdada6eaeb3d1642d73ecb83a79cc (diff)
downloadpfsense-0521b82d1fccd714939ec1b8ca4c1e186543c467.zip
pfsense-0521b82d1fccd714939ec1b8ca4c1e186543c467.tar.gz
Fire up dhclient in the background
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index b3fac8d..ce70224 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -504,9 +504,10 @@ function interfaces_wan_dhcp_configure() {
if ($wancfg['dhcphostname']) {
$dhclientconf .= <<<EOD
-send dhcp-client-identifier "{$wancfg['dhcphostname']}";
-interface "{$wancfg['if']}" {
+ send dhcp-client-identifier "{$wancfg['dhcphostname']}";
+ interface "{$wancfg['if']}" {
send host-name "{$wancfg['dhcphostname']}";
+
}
EOD;
@@ -515,12 +516,13 @@ EOD;
fwrite($fd, $dhclientconf);
fclose($fd);
+ $wanif = $wancfg['if'];
+
/* bring wan interface up before starting dhclient */
- mwexec("/sbin/ifconfig {$wancfg['if']} up");
+ mwexec("/sbin/ifconfig {$wanif} up");
- /* fire up dhclient - don't wait for the lease (-nw) */
- mwexec("/sbin/dhclient -c {$g['varetc_path']}/dhclient.conf " .
- escapeshellarg($wancfg['if']) . " &");
+ /* fire up dhclient */
+ mwexec("/sbin/dhclient -c {$g['varetc_path']}/dhclient.conf {$wanif} &";
return 0;
}
OpenPOWER on IntegriCloud