From 1bb72070b70edaa960b3158feba936fbc3687b1f Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 31 Jan 2013 14:49:22 -0500 Subject: upstart/cloud-init-container.conf: ensure /run/network exists 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. --- upstart/cloud-init-container.conf | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'upstart') 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 -- cgit v1.2.3