summaryrefslogtreecommitdiff
path: root/upstart/cloud-init-nonet.conf
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-09-01 20:27:19 -0400
committerScott Moser <smoser@ubuntu.com>2011-09-01 20:27:19 -0400
commitbd42e16c4ce6e785e332d423c92fe736452813f4 (patch)
tree247d9d9a69f7576e971d0ff7c65b19e1ba6f5a55 /upstart/cloud-init-nonet.conf
parenteba3c61ba5e40ced5545fd0fe58b3e6b04fb4fe4 (diff)
downloadvyos-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.
Diffstat (limited to 'upstart/cloud-init-nonet.conf')
-rw-r--r--upstart/cloud-init-nonet.conf9
1 files changed, 5 insertions, 4 deletions
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