[Pkg-sysvinit-devel] Bug#708934: Bug#708934: how to avoid all mounts for LXC systems?

Steve Langasek vorlon at debian.org
Sun May 19 17:57:48 UTC 2013


On Sun, May 19, 2013 at 03:20:25PM +0100, Roger Leigh wrote:
> On Sun, May 19, 2013 at 04:13:43PM +0200, Harald Dunkel wrote:
> > For LXC systems all mounts are supposed to happen _before_
> > init is run. Every mount tried by one of the run level scripts
> > creates a "permission denied" error message.

> > Below is a sample boot session showing startup and shutdown
> > of a LXC system (CONCURRENCY=none).

> > The problem is that I cannot disable the "unwanted" scripts
> > performing the mount, because I would loose other initialization
> > steps as well.

> > It would be very nice if the run level scripts doing mount/\
> > umount could be streamlined to support LXC systems.

> If the scripts should be no-ops when lxc is in use, then this
> should be fairly straightforward to cater for.  How do we detect
> unambigiously if lxc is in use?

I strongly recommend a more generic approach of detecting whether the
required mount is already mounted, and skipping the operation if it is.

This has two advantages:

 - this isn't specific to lxc, but will correctly handle any other
   (theoretical) cases where the mounts are handled prior to initscripts.
 - if the lxc environment doesn't match the initscripts expectations, there
   will still be a suitable error message at boot about the failure to mount
   any mounts that are missing.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20130519/6d0b1421/attachment.pgp>


More information about the Pkg-sysvinit-devel mailing list