[lxc-devel] [PATCH] Improve check for systemd in the template for Fedora

Michael H. Warfield mhw at WittsEnd.com
Wed Aug 14 02:40:36 UTC 2013


On Tue, 2013-08-13 at 20:57 -0500, Serge Hallyn wrote: 
> Quoting Michael H. Warfield (mhw at WittsEnd.com):
> > Woa!  Hold!  Time out.  Do not do this.
> > 
> > On Tue, 2013-08-13 at 16:36 +0900, Satoshi Matsumoto wrote: 
> > > Configure the guest init based on whether the PID 1 process is systemd
> > > or not.
> > 
> > > In the template for Fedora, currently the guest is configured based on
> > > whether the /bin/systemd exists in the host or not.
> > 
> > No...  It should be based on if systemd exists in the guest or not.  If
> > not, I (we) have a bug.  I thought that was under a chroot.  If not, I
> > will check it and fix it.
> 
> The current code is testing for systemd on the host.  That's not right.
> You're right that checking for the running systemd in the guest isn't
> right either :)
> 
> So I'd say the thing to do is

> ...
> > > diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in
> > > index 23728c6..36c3d21 100644
> > > --- a/templates/lxc-fedora.in
> > > +++ b/templates/lxc-fedora.in
> > > @@ -567,7 +567,7 @@ if [ $? -ne 0 ]; then
> > >      exit 1
> > >  fi
> > 
> > > -type /bin/systemd >/dev/null 2>&1

> replace that with checking for $rootfs/bin/systemd as
> well as $rootfs/usr/bin/systemd?

That's just what I've been thinking.  It may not be perfectly optimal
but I think it's the best we can expect.  And, yes, lets check them
both.

> -serge

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130813/6f9c0858/attachment.pgp>


More information about the lxc-devel mailing list