Let the tun services depend on /dev/net/tun

This commit is contained in:
Eelco Dolstra 2012-10-11 17:59:41 -04:00
parent d63da5892c
commit e3c1865067

View File

@ -351,6 +351,8 @@ in
createTunDevice = i: nameValuePair "${i.name}"
{ description = "Virtual Network Interface ${i.name}";
requires = [ "dev-net-tun.device" ];
after = [ "dev-net-tun.device" ];
wantedBy = [ "network.target" "sys-subsystem-net-devices-${i.name}.device" ];
serviceConfig =
{ Type = "oneshot";
@ -407,6 +409,11 @@ in
hostname "${config.networking.hostName}"
'';
services.udev.extraRules =
''
KERNEL=="tun", TAG+="systemd"
'';
};
}