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

Stéphane Graber stgraber at ubuntu.com
Thu Jan 16 21:46:00 UTC 2014


On Thu, Jan 16, 2014 at 03:40:53PM -0600, Serge Hallyn wrote:
> 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?

Just bad copy/paste from the sysvinit one... v3 on the way.

> 
> thanks
> -serge
> _______________________________________________
> 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: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140116/0ee346b7/attachment.pgp>


More information about the lxc-devel mailing list