/etc/init/lxc.conf is in lxc 0.7.5-3ubuntu52.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | description "lxc"
author "Serge Hallyn <serge.hallyn@canonical.com>"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
env LXC_AUTO="false"
env LXC_SHUTDOWN_TIMEOUT="120"
pre-start script
[ -f /etc/default/lxc ] && . /etc/default/lxc
[ "x$LXC_AUTO" = "xtrue" ] || { stop; exit 0; }
ls /etc/lxc/auto/* > /dev/null 2>&1 || exit 0;
for f in /etc/lxc/auto/*; do
c="$(basename $f .conf)"
lxc-info -n $c 2>/dev/null | grep state | grep -q "RUNNING" || lxc-start -n $c -f $f -d
done
# don't load profiles if mount mediation is not supported
SYSF=/sys/kernel/security/apparmor/features/mount/mask
if [ -f $SYSF ]; then
if [ -x /lib/init/apparmor-profile-load ]; then
/lib/init/apparmor-profile-load usr.bin.lxc-start
/lib/init/apparmor-profile-load lxc-containers
fi
fi
end script
post-stop script
[ -f /etc/default/lxc ] && . /etc/default/lxc
[ "x$LXC_AUTO" = "xtrue" ] || { exit 0; }
ls /etc/lxc/auto/* > /dev/null 2>&1 || exit 0;
for f in /etc/lxc/auto/*; do
c="$(basename $f .conf)"
lxc-shutdown -n $c -w -t $LXC_SHUTDOWN_TIMEOUT &
done
wait
end script
|