diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-12-21 00:21:43 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-12-21 00:21:43 +0000 |
commit | bdc3c4891216785ffc80508060639ce48434b501 (patch) | |
tree | 9eae4da6175eed6fe71a693ba0729d06c479b02c | |
parent | 751cf8beedff9e32eab038e865c0573860439f37 (diff) | |
download | pfsense-bdc3c4891216785ffc80508060639ce48434b501.zip pfsense-bdc3c4891216785ffc80508060639ce48434b501.tar.gz |
* Set dhclient-script using option
* Use -nw
Obtained from latest m0n0 beta 1.3
-rw-r--r-- | etc/inc/interfaces.inc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index f2a2db5..a0e1abc 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -957,7 +957,6 @@ function interfaces_opt_dhcp_configure($interface) { $dhclientconf .= <<<EOD interface "{$optif}" { - script "/sbin/dhclient-script"; {$dhclientconf_hostname} } @@ -970,7 +969,7 @@ EOD; mwexec("/sbin/ifconfig {$optif} up"); /* fire up dhclient */ - mwexec("/sbin/dhclient -cf {$g['varetc_path']}/dhclient_{$optif}.conf {$optif}"); + mwexec("/sbin/dhclient -nw -cf {$g['varetc_path']}/dhclient_{$optif}.conf -sf /sbin/dhclient-script {$optif}"); return 0; } @@ -1002,7 +1001,6 @@ function interfaces_dhcp_configure($interface) { $dhclientconf .= <<<EOD interface "{$realinterface}" { {$dhclientconf_hostname} - script "/sbin/dhclient-script"; } EOD; @@ -1016,10 +1014,10 @@ EOD; mwexec("/sbin/ifconfig {$optif} up"); /* fire up dhclient */ - mwexec("/sbin/dhclient -cf {$g['varetc_path']}/dhclient_{$optif}.conf {$optif} >/tmp/{$optif}_output 2>/tmp/{$optif}_error_output"); + mwexec("/sbin/dhclient -nw -cf {$g['varetc_path']}/dhclient_{$optif}.conf -sf /sbin/dhclient-script {$optif} "); $fout = fopen("/tmp/ifconfig_{$optif}","w"); - fwrite($fout, "/sbin/dhclient -cf {$g['varetc_path']}/dhclient_{$optif}.conf {$optif}"); + fwrite($fout, "/sbin/dhclient -nw -cf {$g['varetc_path']}/dhclient_{$optif}.conf -sf /sbin/dhclient-script {$optif}"); fclose($fout); return 0; @@ -1049,7 +1047,6 @@ function interfaces_wan_dhcp_configure() { $dhclientconf .= <<<EOD interface "{$wancfg['if']}" { {$dhclientconf_hostname} - script "/sbin/dhclient-script"; } EOD; @@ -1063,10 +1060,10 @@ EOD; mwexec("/sbin/ifconfig {$wanif} up"); /* fire up dhclient */ - mwexec("/sbin/dhclient -cf {$g['varetc_path']}/dhclient_wan.conf {$wanif} >/tmp/{$wanif}_output 2>/tmp/{$wanif}_error_output"); + mwexec("/sbin/dhclient -nw -cf {$g['varetc_path']}/dhclient_wan.conf -sf /sbin/dhclient-script {$wanif}"); $fout = fopen("/tmp/ifconfig_{$wanif}","w"); - fwrite($fout, "/sbin/dhclient -cf {$g['varetc_path']}/dhclient_wan.conf {$wanif}"); + fwrite($fout, "/sbin/dhclient -nw -cf {$g['varetc_path']}/dhclient_wan.conf -sf /sbin/dhclient-script {$wanif}"); fclose($fout); return 0; |