On 12/15/11 12:23, Roger Leigh wrote:
> On Thu, Dec 15, 2011 at 11:50:40AM +0100, Harald Dunkel wrote:
>> PS: A similar problem exists for /etc/init.d/umountroot.
>> It remounts the lxc root partition read-only, which affects
>> the host system. This is a severe problem.
>>
>> The workaround is to disable both startup scripts in
>> /etc/insserv/overrides.
> 
> Does "ischroot" correctly detect an lxc container?  i.e.
> 
> ischroot; echo $?
> 

No, it doesn't:

        root@vs001:~# ischroot
        root@vs001:~# echo $?
        1

(This is Squeeze. ischroot is not available in Squeeze,
but it built fine.)

AFAIK /proc/1/cgroup shows in lxc

        root@vs001:~# cat /proc/1/cgroup
        1:blkio,net_cls,freezer,devices,cpuacct,cpu,ns,cpuset:/vs001

"vs001" is the container name. On the host system I see

        srvl028:/var/lib/lxc# cat /proc/1/cgroup
        1:blkio,net_cls,freezer,devices,cpuacct,cpu,ns,cpuset:/

instead. But I doubt that this is a stable method to detect lxc.


Regards

Harri



_______________________________________________
Pkg-sysvinit-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-sysvinit-devel

Reply via email to