From a5ea0c5380d364016a2ab80660e03fc059bc1563 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 31 Aug 2011 16:32:03 -0400 Subject: cloud-init-nonet.conf: wait for all network interfaces to be up This continues the change in this file that intended to wait for all networking to be up. The logic that was there would cause it to start cloud-init immediately if a single non-lo interface was up. This will basically just check if 'static-network-up' has occurred during this boot. There could be an issue if /var/run was populated from a previous boot, but since its really expected to be a tmpfs, can't have anything in it. --- upstart/cloud-init-nonet.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'upstart') diff --git a/upstart/cloud-init-nonet.conf b/upstart/cloud-init-nonet.conf index 9a47b105..a39daf35 100644 --- a/upstart/cloud-init-nonet.conf +++ b/upstart/cloud-init-nonet.conf @@ -9,8 +9,10 @@ task console output script - # if a non 'lo' interface is up, exit immediately - grep -qv '^lo' /var/run/network/ifstate >/dev/null 2>&1 && exit 0 + # /var/run/network/static-network-up-emitted is written by + # /etc/network/if-up.d/upstart its presense would indicate + # that static-network-up has already fired. + [ -e /var/run/network/static-network-up-emitted ] && exit 0 [ -f /var/lib/cloud/instance/obj.pkl ] && exit 0 -- cgit v1.2.3