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:
Lluís Batlle i Rossell 2010-01-12 11:08:27 +00:00
parent c68f5fbae4
commit b5ade01199

View file

@ -179,8 +179,8 @@ in
# Run any user-specified commands.
${pkgs.stdenv.shell} ${pkgs.writeText "local-net-cmds" cfg.localCommands} || true
# Emit the ip-up event (e.g. to start ntpd).
${optionalString (cfg.interfaces != []) ''
${optionalString (cfg.interfaces != [] && cfg.localCommands != "") ''
# Emit the ip-up event (e.g. to start ntpd).
initctl emit -n ip-up
''}
'';