diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-06-20 23:12:47 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-06-20 23:12:47 +0000 |
commit | 0521b82d1fccd714939ec1b8ca4c1e186543c467 (patch) | |
tree | 997865123a5b72d391de3887773ec6774fc6d74f /etc | |
parent | fc1c20c4715fdada6eaeb3d1642d73ecb83a79cc (diff) | |
download | pfsense-0521b82d1fccd714939ec1b8ca4c1e186543c467.zip pfsense-0521b82d1fccd714939ec1b8ca4c1e186543c467.tar.gz |
Fire up dhclient in the background
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 14 |
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; } |