summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--upstart/cloud-init-container.conf6
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4745a327..639d5560 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
functionality (LP: #1108047)
- fix documentation for write_files to correctly list 'permissions'
rather than 'perms' (LP: #1111205)
+ - cloud-init-container.conf: ensure /run/network before running ifquery
0.7.1:
- sysvinit: fix missing dependency in cloud-init job for RHEL 5.6
- config-drive: map hostname to local-hostname (LP: #1061964)
diff --git a/upstart/cloud-init-container.conf b/upstart/cloud-init-container.conf
index 051c6e50..6bdbe77e 100644
--- a/upstart/cloud-init-container.conf
+++ b/upstart/cloud-init-container.conf
@@ -21,6 +21,12 @@ script
# if the all static network interfaces are already up, nothing to do
[ -f "$MARK_STATIC_NETWORK_EMITTED" ] && exit 0
+ # ifquery will exit failure if there is no /run/network directory.
+ # normally that would get created by one of network-interface.conf
+ # or networking.conf. But, it is possible that we're running
+ # before either of those have.
+ mkdir -p /run/network
+
# get list of all 'auto' interfaces. if there are none, nothing to do.
auto_list=$(ifquery --list --allow auto 2>/dev/null) || :
[ -z "$auto_list" ] && exit 0