[lxc-devel] [lxc/lxc] 0af993: Rework init scripts
GitHub
noreply at github.com
Mon Sep 29 16:17:36 UTC 2014
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: 0af993195cbd57cff700c7c90ee8f95c2a1ef8aa
https://github.com/lxc/lxc/commit/0af993195cbd57cff700c7c90ee8f95c2a1ef8aa
Author: Michael H. Warfield <mhw at WittsEnd.com>
Date: 2014-09-26 (Fri, 26 Sep 2014)
Changed paths:
M config/Makefile.am
M config/etc/Makefile.am
A config/etc/default.conf.lxcbr
R config/etc/default.conf.ubuntu
M config/init/Makefile.am
A config/init/common/Makefile.am
A config/init/common/lxc-containers.in
A config/init/common/lxc-net.in
M config/init/systemd/Makefile.am
M config/init/systemd/lxc-net.service.in
M config/init/systemd/lxc.service.in
M config/init/sysvinit/Makefile.am
A config/init/sysvinit/lxc-containers.in
A config/init/sysvinit/lxc-net.in
R config/init/sysvinit/lxc.in
M config/init/upstart/Makefile.am
R config/init/upstart/lxc-net.conf
A config/init/upstart/lxc-net.conf.in
A config/sysconfig/Makefile.am
A config/sysconfig/lxc.in
M configure.ac
M lxc.spec.in
M src/lxc/Makefile.am
R src/lxc/lxc.net
Log Message:
-----------
Rework init scripts
This commit is based on the work of:
Signed-off-by: Michael H. Warfield <mhw at WittsEnd.com>
A generic changelog would be:
- Bring support for lxcbr0 to all distributions
- Share the container startup and network configuration logic across
distributions and init systems.
- Have all the init scripts call the helper script.
- Support for the various different distro-specific configuration
locations to configure lxc-net and container startup.
Changes on top of Mike's original version:
- Remove sysconfig/lxc-net as it's apparently only there as a
workaround for an RPM limitation and is breaking Debian systems by
including a useless file which will get registered as a package provided
conffile in the dpkg database and will therefore cause conffile prompts
on upgrades...
- Go with a consistant coding style in the various init scripts.
- Split out the common logic from the sysvinit scripts and ship both in
their respective location rather than have them be copies.
- Fix the upstart jobs so they actually work (there's no such thing as
libexec on Debian systems).
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
Commit: fce070c815604e863f4628ecceb172ffdbbb2465
https://github.com/lxc/lxc/commit/fce070c815604e863f4628ecceb172ffdbbb2465
Author: Dwight Engen <dwight.engen at oracle.com>
Date: 2014-09-29 (Mon, 29 Sep 2014)
Changed paths:
M .gitignore
M config/init/common/lxc-containers.in
M config/init/sysvinit/lxc-containers.in
M config/init/sysvinit/lxc-net.in
M lxc.spec.in
M templates/lxc-oracle.in
Log Message:
-----------
fixups to init script rework
- move action() from common to sysvinit wrapper since its only really
applicable for sysvinit and not the other init systems
- fix bug in action() fallback, need to shift away msg before executing action
- make lxc-net 98 so it starts before lxc-container (99), otherwise the lxcbr0
won't be available when containers are autostarted
- make the default RUNTIME_PATH be /var/run instead of /run. On older
distros (like ol6.5) /run doesn't exist. lxc-net will create this directory
and attempt to create the dnsmasq.pid file in it, but this will fail when
SELinux is enabled because the directory will have the default_t type.
Newer systems have /var/run symlinked to /run so you get to the same place
in that case.
- add %postun to remove lxc-dnsmasq user when pkgs are removed
- fix bug in lxc-oracle template that was creating /var/lock/subsys/lxc as
a dir and interfering with the init scripts
Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
Compare: https://github.com/lxc/lxc/compare/a1dd59de3564...fce070c81560
More information about the lxc-devel
mailing list