summaryrefslogtreecommitdiff
path: root/upstart
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-08-31 16:32:03 -0400
committerScott Moser <smoser@ubuntu.com>2011-08-31 16:32:03 -0400
commita5ea0c5380d364016a2ab80660e03fc059bc1563 (patch)
treecf0695c7d49c2216450ef1cfa2c7d5ccfcb6d534 /upstart
parentca72374bebb24397219f62848c2fda599997e850 (diff)
downloadvyos-cloud-init-a5ea0c5380d364016a2ab80660e03fc059bc1563.tar.gz
vyos-cloud-init-a5ea0c5380d364016a2ab80660e03fc059bc1563.zip
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.
Diffstat (limited to 'upstart')
-rw-r--r--upstart/cloud-init-nonet.conf6
1 files changed, 4 insertions, 2 deletions
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