lxc-containers.in revision 215fff92e49f2a183db01403023052d632acbf64
sysconfdir="@SYSCONFDIR@"
distrosysconfdir="@LXC_DISTRO_SYSCONF@"
bindir="@BINDIR@"
localstatedir="@LOCALSTATEDIR@"
# These can be overridden in @LXC_DISTRO_SYSCONF@/lxc
# Autostart containers?
LXC_AUTO="true"
# BOOTGROUPS - What groups should start on bootup?
# Comma separated list of groups.
# Leading comma, trailing comma or embedded double
# comma indicates when the NULL group should be run.
# Example (default): boot the onboot group first then the NULL group
BOOTGROUPS="onboot,"
# SHUTDOWNDELAY - Wait time for a container to shut down.
# Container shutdown can result in lengthy system
# shutdown times. Even 5 seconds per container can be
# too long.
# OPTIONS can be used for anything else.
# If you want to boot everything then
# options can be "-a" or "-a -A".
# STOPOPTS are stop options. The can be used for anything else to stop.
# If you want to kill containers fast, use -k
STOPOPTS="-a -A -s"
then
else
fi
# Source any configurable options
# Check for needed utility program
# If libvirtd is providing the bridge, it might not be
# immediately available, so wait a bit for it before starting
# up the containers or else any that use the bridge will fail
# to start
{
return 0
fi
done
return 0
done
}
# See how we were called.
case "$1" in
if [ -n "$BOOTGROUPS" ]; then
BOOTGROUPS="-g $BOOTGROUPS"
fi
# Start containers
# Start autoboot containers first then the NULL group "onboot,".
;;
stop)
if [ -n "$SHUTDOWNDELAY" ]; then
fi
# The stop is serialized and can take excessive time. We need to avoid
# delaying the system shutdown / reboot as much as we can since it's not
# parallelized... Even 5 second timout may be too long.
;;
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 2
;;
esac
exit $?