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

Michael H. Warfield mhw at WittsEnd.com
Wed Aug 14 14:47:42 UTC 2013


Hey Serge,

On Wed, 2013-08-14 at 07:13 -0500, Serge Hallyn wrote: 
> Quoting Michael H. Warfield (mhw at WittsEnd.com):
> > On Tue, 2013-08-13 at 20:57 -0500, Serge Hallyn wrote: 
> > > 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.

> Ok - who wants to send the new patch?  :)

I'll get it.  But I do think I see a more reasonable test.  The
"config_fedora_system" is basically manipulating the systemd files
in /etc/systemd.  That directory (and /lib/systemd) have to exist for
that function to, errr, function.  I think I'll just key off
the /etc/systemd directory and not try hunting down the binary.  It's a
trivial patch.  I'll have it in shortly.  I just want to review a couple
things around it first.

> thanks,
> -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/20130814/4e0bca1f/attachment.pgp>


More information about the lxc-devel mailing list