Make network-interfaces emit the ip-up if there are interfaces defined *OR*
there are localCommands (which potentially can bring up interfaces). svn path=/nixos/trunk/; revision=19371
This commit is contained in:
parent
c68f5fbae4
commit
b5ade01199
@ -179,8 +179,8 @@ in
|
|||||||
# Run any user-specified commands.
|
# Run any user-specified commands.
|
||||||
${pkgs.stdenv.shell} ${pkgs.writeText "local-net-cmds" cfg.localCommands} || true
|
${pkgs.stdenv.shell} ${pkgs.writeText "local-net-cmds" cfg.localCommands} || true
|
||||||
|
|
||||||
|
${optionalString (cfg.interfaces != [] && cfg.localCommands != "") ''
|
||||||
# Emit the ip-up event (e.g. to start ntpd).
|
# Emit the ip-up event (e.g. to start ntpd).
|
||||||
${optionalString (cfg.interfaces != []) ''
|
|
||||||
initctl emit -n ip-up
|
initctl emit -n ip-up
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user