[lxc-devel] [PATCH] Make systemd lxc.service use lxc-autostart

Stéphane Graber stgraber at ubuntu.com
Thu May 1 15:59:14 UTC 2014


On Thu, May 01, 2014 at 11:46:54AM -0400, Michael H. Warfield wrote:
> [PATCH] Make systemd lxc.service use lxc-autostart
> 
> Changes lxc.service to call lxc-autostart for starting and
> stopping containers.
> 
> Signed-off-by: Michael H. Warfield <mhw at WittsEnd.com>

Nak.

You probably meant lxc-autostart rather than lxc-start. You also
probably don't want an absolute path in there (or if you do, you should
be using autoconf to template it for you).

Might also be worth testing the unit before sending it upstream ;)

> ---
>  config/init/systemd/lxc.service | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/config/init/systemd/lxc.service b/config/init/systemd/lxc.service
> index aa20b91..4573702 100644
> --- a/config/init/systemd/lxc.service
> +++ b/config/init/systemd/lxc.service
> @@ -6,8 +6,8 @@ After=syslog.target
>  Type=oneshot
>  RemainAfterExit=yes
>  ExecStartPre=/usr/libexec/lxc/lxc-devsetup
> -ExecStart=/usr/libexec/lxc/lxc-startup start
> -ExecStop=/usr/libexec/lxc/lxc-startup stop
> +ExecStart=/usr/bin/lxc-start -a
> +ExecStop=/usr/bin/lxc-start -s
>  # Environment=BOOTUP=serial
>  # Environment=CONSOLETYPE=serial
>  StandardOutput=syslog
> -- 
> 1.9.0
> 
> 
> -- 
> Michael H. Warfield (AI4NB) | (770) 978-7061 |  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!
> 



> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140501/905176ca/attachment.sig>


More information about the lxc-devel mailing list