diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-09-01 20:27:19 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-09-01 20:27:19 -0400 |
commit | bd42e16c4ce6e785e332d423c92fe736452813f4 (patch) | |
tree | 247d9d9a69f7576e971d0ff7c65b19e1ba6f5a55 | |
parent | eba3c61ba5e40ced5545fd0fe58b3e6b04fb4fe4 (diff) | |
download | vyos-cloud-init-bd42e16c4ce6e785e332d423c92fe736452813f4.tar.gz vyos-cloud-init-bd42e16c4ce6e785e332d423c92fe736452813f4.zip |
cloud-init-nonet.conf: just allow for the possibility that /var/run != /run
This should not happen any time in the near future, but /var/run
is actually legacy, so accept that it might not be there.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | upstart/cloud-init-nonet.conf | 9 |
2 files changed, 6 insertions, 4 deletions
@@ -49,6 +49,7 @@ inserted actually do something (LP: #434076, LP: #833499) - log warning on failure to set hostname (LP: #832175) - upstart/cloud-init-nonet.conf: wait for all network interfaces to be up + allow for the possibility of /var/run != /run. - DataSourceNoCloud, DataSourceOVF : do not provide a default hostname. This way the configured hostname of the system will be used if not provided by metadata (LP: #838280) diff --git a/upstart/cloud-init-nonet.conf b/upstart/cloud-init-nonet.conf index 01916354..70c7dfea 100644 --- a/upstart/cloud-init-nonet.conf +++ b/upstart/cloud-init-nonet.conf @@ -10,10 +10,11 @@ task console output script - # /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 + # /run/network/static-network-up-emitted is written by + # upstart (via /etc/network/if-up.d/upstart). its presense would + # indicate that static-network-up has already fired. + EMITTED="/run/network/static-network-up-emitted" + [ -e "$EMITTED" -o -e "/var/$EMITTED" ] && exit 0 [ -f /var/lib/cloud/instance/obj.pkl ] && exit 0 |