[Pkg-sysvinit-devel] Bug#652168: don't run "swapoff -a" for lxc
Roger Leigh
rleigh at codelibre.net
Thu Dec 15 11:23:29 UTC 2011
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 $?
It should be nonzero on the host system, zero in the container.
If so, we can just run it in the initscript to conditionally
run swapoff and umountroot.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
More information about the Pkg-sysvinit-devel
mailing list