* In the network-interfaces task, emit an ip-up event if there is a

statically configured interface (i.e. we're not running dhclient).
  Otherwise the ntpd job won't be triggered.
* Use the "-n" flag of "initctl emit" to send the event
  asynchronously.

svn path=/nixos/branches/upstart-0.6/; revision=18227
This commit is contained in:
Eelco Dolstra
2009-11-06 21:38:40 +00:00
parent 4b2ff53ec6
commit d545d08461
8 changed files with 26 additions and 14 deletions

View File

@@ -28,11 +28,11 @@ let
# it"), so we silently lose time synchronisation.
${config.system.build.upstart}/sbin/initctl stop ntpd
${config.system.build.upstart}/sbin/initctl emit ip-up
${config.system.build.upstart}/sbin/initctl emit -n ip-up
fi
if test "$reason" = EXPIRE -o "$reason" = RELEASE; then
${config.system.build.upstart}/sbin/initctl emit ip-down
${config.system.build.upstart}/sbin/initctl emit -n ip-down
fi
'';

View File

@@ -82,7 +82,7 @@ in
chown ${ntpUser} ${stateDir}
# Needed to run ntpd as an unprivileged user.
${modprobe}/sbin/modprobe capability || true
${modprobe}/sbin/modprobe --quiet capability
# !!! This can hang indefinitely if the network is down or
# the servers are unreachable. This is particularly bad