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.
This commit is contained in:
parent
43c550af6a
commit
984bd6112f
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user