nixos: Support network-online target in addition to ip-up
This commit is contained in:
parent
0626c1ecf0
commit
2057d9087f
@ -58,6 +58,7 @@ let
|
|||||||
${config.systemd.package}/bin/systemctl try-restart ntpd.service
|
${config.systemd.package}/bin/systemctl try-restart ntpd.service
|
||||||
|
|
||||||
${config.systemd.package}/bin/systemctl start ip-up.target
|
${config.systemd.package}/bin/systemctl start ip-up.target
|
||||||
|
${config.systemd.package}/bin/systemctl start network-online.target
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if [ "$reason" = EXPIRE -o "$reason" = RELEASE -o "$reason" = NOCARRIER ] ; then
|
#if [ "$reason" = EXPIRE -o "$reason" = RELEASE -o "$reason" = NOCARRIER ] ; then
|
||||||
|
@ -52,6 +52,7 @@ let
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if test "$2" = "up"; then
|
if test "$2" = "up"; then
|
||||||
${config.systemd.package}/bin/systemctl start ip-up.target
|
${config.systemd.package}/bin/systemctl start ip-up.target
|
||||||
|
${config.systemd.package}/bin/systemctl start network-online.target
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -47,8 +47,8 @@ in
|
|||||||
{ description = "Networking Setup";
|
{ description = "Networking Setup";
|
||||||
|
|
||||||
after = [ "network-interfaces.target" ];
|
after = [ "network-interfaces.target" ];
|
||||||
before = [ "network.target" "network-online.target" ];
|
before = [ "network.target" ];
|
||||||
wantedBy = [ "network.target" "network-online.target" ];
|
wantedBy = [ "network.target" ];
|
||||||
|
|
||||||
unitConfig.ConditionCapability = "CAP_NET_ADMIN";
|
unitConfig.ConditionCapability = "CAP_NET_ADMIN";
|
||||||
|
|
||||||
@ -149,6 +149,7 @@ in
|
|||||||
${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service
|
${config.systemd.package}/bin/systemctl try-restart --no-block network-setup.service
|
||||||
fi
|
fi
|
||||||
${config.systemd.package}/bin/systemctl start ip-up.target
|
${config.systemd.package}/bin/systemctl start ip-up.target
|
||||||
|
${config.systemd.package}/bin/systemctl start network-online.target
|
||||||
'';
|
'';
|
||||||
preStop =
|
preStop =
|
||||||
''
|
''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user