[Lxc-users] How to make a container init DIE after finishing runlevel 0
Daniel Lezcano
daniel.lezcano at free.fr
Tue Jan 26 00:50:11 UTC 2010
Michael H. Warfield wrote:
> On Tue, 2010-01-26 at 00:42 +0100, Daniel Lezcano wrote:
>
>
>> I trick I just found:
>>
>> while $(true); do
>> inotifywait /var/lib/lxc/debian/rootfs/var/run/utmp;
>> if [ "$(wc -l /cgroup/debian/tasks | awk '{ print $1 }')" = "1" ]; then
>> lxc-stop -n debian
>> fi;
>> done
>>
>
> Seems to be a problem with that approach. I'm not seeing anythign
> in /var/lib/lxc/${VM}/rootfs any more. Use to with 0.6.4 and earlier
> but not now. That seems to have "gone away". That might have been a
> way to get around that tmpfs problem but it's not there and I have to
> resort back to the real rootfs.
>
With a version > 0.6.4 the lxc-debian script write the rootfs in the
/var/lib/lxc/debian/rootfs.
With a version <= 0.6.4 the rootfs is created in the current directory.
Note if you have the source code from git, I incremented the version
right before the tag 0.6.5, so you may have a pre-0.6.5 but with the
0.6.4 version information.
More information about the lxc-users
mailing list