* dhcp 4.1 requires IPv6 support.
svn path=/nixos/branches/modular-nixos/; revision=16450
This commit is contained in:
parent
32b311a0f5
commit
c4780a8953
|
@ -60,20 +60,20 @@ in
|
||||||
|
|
||||||
config = mkIf config.networking.useDHCP {
|
config = mkIf config.networking.useDHCP {
|
||||||
|
|
||||||
jobs = pkgs.lib.singleton {
|
jobs = pkgs.lib.singleton
|
||||||
name = "dhclient";
|
{ name = "dhclient";
|
||||||
|
|
||||||
job = ''
|
startOn = "network-interfaces/started";
|
||||||
description "DHCP client"
|
stopOn = "network-interfaces/stop";
|
||||||
|
|
||||||
start on network-interfaces/started
|
preStart =
|
||||||
stop on network-interfaces/stop
|
''
|
||||||
|
# dhclient barfs if /proc/net/if_inet6 doesn't exist.
|
||||||
env PATH_DHCLIENT_SCRIPT=${dhcp}/sbin/dhclient-script
|
${config.system.sbin.modprobe}/sbin/modprobe ipv6 || true
|
||||||
|
'';
|
||||||
script
|
|
||||||
export PATH=${nettools}/sbin:$PATH
|
|
||||||
|
|
||||||
|
script =
|
||||||
|
''
|
||||||
# Determine the interface on which to start dhclient.
|
# Determine the interface on which to start dhclient.
|
||||||
interfaces=
|
interfaces=
|
||||||
|
|
||||||
|
@ -91,10 +91,9 @@ in
|
||||||
|
|
||||||
mkdir -m 755 -p ${stateDir}
|
mkdir -m 755 -p ${stateDir}
|
||||||
|
|
||||||
exec ${dhcp}/sbin/dhclient -d $interfaces -e "PATH=$PATH" -lf ${stateDir}/dhclient.leases
|
exec ${dhcp}/sbin/dhclient -d $interfaces -e "PATH=$PATH" -lf ${stateDir}/dhclient.leases -sf ${dhcp}/sbin/dhclient-script
|
||||||
end script
|
'';
|
||||||
'';
|
};
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [dhcp];
|
environment.systemPackages = [dhcp];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue