summaryrefslogtreecommitdiff
path: root/upstart/cloud-init-container.conf
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-08-10 09:06:15 -0600
committerScott Moser <smoser@ubuntu.com>2016-08-10 09:06:15 -0600
commitc3c3dc693c14175e110b5fe125d4d5f98ace9700 (patch)
tree8858702c2c8a6ad4bf1bb861a4565e0a9c28e588 /upstart/cloud-init-container.conf
parent5bd3493d732e5b1902872958e8681f17cbc81ce5 (diff)
downloadcloud-init-trunk.tar.gz
README: Mention move of revision control to git.HEADtrunk
cloud-init development has moved its revision control to git. It is available at https://code.launchpad.net/cloud-init Clone with git clone https://git.launchpad.net/cloud-init or git clone git+ssh://git.launchpad.net/cloud-init For more information see https://git.launchpad.net/cloud-init/tree/HACKING.rst
Diffstat (limited to 'upstart/cloud-init-container.conf')
-rw-r--r--upstart/cloud-init-container.conf57
1 files changed, 0 insertions, 57 deletions
diff --git a/upstart/cloud-init-container.conf b/upstart/cloud-init-container.conf
deleted file mode 100644
index 6bdbe77e..00000000
--- a/upstart/cloud-init-container.conf
+++ /dev/null
@@ -1,57 +0,0 @@
-# in a lxc container, events for network interfaces do not
-# get created or may be missed. This helps cloud-init-nonet along
-# by emitting those events if they have not been emitted.
-
-start on container
-stop on static-network-up
-task
-
-emits net-device-added
-
-console output
-
-script
- # if we are inside a container, then we may have to emit the ifup
- # events for 'auto' network devices.
- set -f
-
- # from /etc/network/if-up.d/upstart
- MARK_DEV_PREFIX="/run/network/ifup."
- MARK_STATIC_NETWORK_EMITTED="/run/network/static-network-up-emitted"
- # 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
- set -- ${auto_list}
- [ "$*" = "lo" ] && exit 0
-
- # we only want to emit for interfaces that do not exist, so filter
- # out anything that does not exist.
- for iface in "$@"; do
- [ "$iface" = "lo" ] && continue
- # skip interfaces that are already up
- [ -f "${MARK_DEV_PREFIX}${iface}" ] && continue
-
- if [ -d /sys/net ]; then
- # if /sys is mounted, and there is no /sys/net/iface, then no device
- [ -e "/sys/net/$iface" ] && continue
- else
- # sys wasn't mounted, so just check via 'ifconfig'
- ifconfig "$iface" >/dev/null 2>&1 || continue
- fi
- initctl emit --no-wait net-device-added "INTERFACE=$iface" &&
- emitted="$emitted $iface" ||
- echo "warn: ${UPSTART_JOB} failed to emit net-device-added INTERFACE=$iface"
- done
-
- [ -z "${emitted# }" ] ||
- echo "${UPSTART_JOB}: emitted ifup for ${emitted# }"
-end script