Switch to ISC-Dhclient. OpenBSD's dhclient is driving me bonkers.

This commit is contained in:
Scott Ullrich 2006-12-20 22:06:21 +00:00
parent 656a2feab2
commit 8a7553abb4
2 changed files with 5 additions and 17 deletions

View File

@ -11,18 +11,6 @@ options {
[0-9]+";
};
# Handle ethernet linkup and linkdown
notify 0 {
match "type" "LINK_UP";
media-type "ethernet";
action "/bin/echo -n '$subsystem start ' >>/tmp/rc.linkup";
};
notify 0 {
match "type" "LINK_DOWN";
media-type "ethernet";
action "/bin/echo -n '$subsystem stop ' >>/tmp/rc.linkup";
};
# When a USB keyboard arrives, attach it as the console keyboard.
attach 100 {
device-name "ukbd0";

View File

@ -970,7 +970,7 @@ EOD;
mwexec("/sbin/ifconfig {$optif} up");
/* fire up dhclient */
mwexec("/sbin/dhclient -c {$g['varetc_path']}/dhclient_{$optif}.conf {$optif}");
mwexec("/sbin/dhclient -cf {$g['varetc_path']}/dhclient_{$optif}.conf {$optif}");
return 0;
}
@ -1016,10 +1016,10 @@ EOD;
mwexec("/sbin/ifconfig {$optif} up");
/* fire up dhclient */
mwexec("/sbin/dhclient -c {$g['varetc_path']}/dhclient_{$optif}.conf {$optif} >/tmp/{$optif}_output >/tmp/{$optif}_error_output");
mwexec("/sbin/dhclient -cf {$g['varetc_path']}/dhclient_{$optif}.conf {$optif} >/tmp/{$optif}_output 2>/tmp/{$optif}_error_output");
$fout = fopen("/tmp/ifconfig_{$optif}","w");
fwrite($fout, "/sbin/dhclient -c {$g['varetc_path']}/dhclient_{$optif}.conf {$optif}");
fwrite($fout, "/sbin/dhclient -cf {$g['varetc_path']}/dhclient_{$optif}.conf {$optif}");
fclose($fout);
return 0;
@ -1063,10 +1063,10 @@ EOD;
mwexec("/sbin/ifconfig {$wanif} up");
/* fire up dhclient */
mwexec("/sbin/dhclient -c {$g['varetc_path']}/dhclient_wan.conf {$wanif} >/tmp/{$wanif}_output >/tmp/{$wanif}_error_output");
mwexec("/sbin/dhclient -cf {$g['varetc_path']}/dhclient_wan.conf {$wanif} >/tmp/{$wanif}_output 2>/tmp/{$wanif}_error_output");
$fout = fopen("/tmp/ifconfig_{$wanif}","w");
fwrite($fout, "/sbin/dhclient -c {$g['varetc_path']}/dhclient_wan.conf {$wanif}");
fwrite($fout, "/sbin/dhclient -cf {$g['varetc_path']}/dhclient_wan.conf {$wanif}");
fclose($fout);
return 0;