[lxc-devel] [PATCH] init: Add upstart jobs and some more changes (v2)

Serge Hallyn serge.hallyn at ubuntu.com
Thu Jan 16 21:40:53 UTC 2014


Quoting Stéphane Graber (stgraber at ubuntu.com):
> This adds the 3 upstart jobs that we've had in Ubuntu for a while:
>  - lxc.conf: Main upstart job, triggers lxc-net.conf based on config
>  - lxc-instance.conf: Triggered by lxc.conf for each auto-started container
>  - lxc-net.conf: Triggered by lxc.conf, sets up lxcbr0, NAT, mangling, ...
> 
> In addition, there are two extra config files in /etc/default:
>  - lxc: Allows setting some values like http proxying, disabling autostart, ...
>  - lxc-net: Network configuration for the lxcbr0 bridge
> 
> This change also disables the sysv script for all distros but Oracle as
> the current script won't work on either Ubuntu nor Debian and I suspect
> quite a few more distros, so it's not nearly as distro-agnostic as we
> thought.
> 
> For Debian, only install the upstart jobs and systemd unit.
> For Ubuntu, only install the upstart jobs.
> 
> This change also moves all the init related stuff to config/init/
> 
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

> diff --git a/config/init/upstart/Makefile.am b/config/init/upstart/Makefile.am
> new file mode 100644
> index 0000000..9f611f0
> --- /dev/null
> +++ b/config/init/upstart/Makefile.am
> @@ -0,0 +1,22 @@
> +EXTRA_DIST = lxc.conf lxc-instance.conf lxc-net.conf
> +
> +if INIT_SCRIPT_UPSTART
> +install-upstart: lxc.conf lxc-instance.conf lxc-net.conf
> +	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/init/
> +	$(INSTALL_DATA) lxc.conf $(DESTDIR)$(sysconfdir)/init/
> +	$(INSTALL_DATA) lxc-instance.conf $(DESTDIR)$(sysconfdir)/init/
> +	$(INSTALL_DATA) lxc-net.conf $(DESTDIR)$(sysconfdir)/init/
> +
> +uninstall-upstart:
> +	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init/lxc.conf
> +	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init/lxc-instance.conf
> +	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init/lxc-net.conf
> +	rmdir $(DESTDIR)$(sysconfdir)/rc.d/init || :

But why are you removing from rc.d?  Is that another cut-paste
or am I misunderstanding the intent?

thanks
-serge


More information about the lxc-devel mailing list