]> git.ipfire.org Git - thirdparty/lxc.git/commit
export env variable in lxc_start
authorDaniel Lezcano <daniel.lezcano@free.fr>
Thu, 27 Jan 2011 23:14:51 +0000 (00:14 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 27 Jan 2011 23:14:51 +0000 (00:14 +0100)
commit3244e75040a98d2854144ebc169a5a61ddbe0a26
treebe9d0d09aaca4540b4ae108eeaff0c91aac9df7e
parent434d90db57e3d94609b48e2bc3c17777e56eac3a
export env variable in lxc_start

Let's export the 'container' variable and let init receive it
as a kernel command line option.

In the upstart init scripts, we can distinguish if we are in a
container context or not.

===============================================================================

# /dev/console - getty
#
# This service maintains a getty on /dev/console from the point the
# system is started until it is shut down again.
# It only runs in lxc containers.

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

env container
pre-start script
[ "x$container" != "xlxc" ] && { stop; exit 0; }
exit 0;
end script

respawn

exec /sbin/getty -8 38400 /dev/console

===============================================================================

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_start.c