From b5ade0119947539b17269f003feab5ff886d3e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Tue, 12 Jan 2010 11:08:27 +0000 Subject: [PATCH] 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 --- modules/tasks/network-interfaces.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tasks/network-interfaces.nix b/modules/tasks/network-interfaces.nix index 2868c251fca..95cc5041765 100644 --- a/modules/tasks/network-interfaces.nix +++ b/modules/tasks/network-interfaces.nix @@ -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 ''} '';