2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 15:09:28 +00:00

Execute script lxc-devsetup also with sysvinit and upstart.

* This script sets /dev/.lxc which is needed for autodev containers.
  * Previously was only executed with systemd. Execute it also with
    the other init systems (sysvinit and upstart)

Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
This commit is contained in:
Carlos Alberto Lopez Perez
2016-03-04 16:40:21 +01:00
parent 6861fb2291
commit a8c7106328
6 changed files with 9 additions and 4 deletions

View File

@@ -1,2 +1,2 @@
EXTRA_DIST = lxc-containers.in lxc-net.in
pkglibexec_SCRIPTS = lxc-containers lxc-net
pkglibexec_SCRIPTS = lxc-containers lxc-net lxc-devsetup

View File

@@ -1,5 +1,4 @@
EXTRA_DIST = \
lxc-devsetup \
lxc-apparmor-load \
lxc.service.in \
lxc@.service.in \
@@ -8,7 +7,7 @@ EXTRA_DIST = \
if INIT_SCRIPT_SYSTEMD
BUILT_SOURCES = lxc.service lxc@.service lxc-net.service
install-systemd: lxc.service lxc@.service lxc-net.service lxc-devsetup lxc-apparmor-load
install-systemd: lxc.service lxc@.service lxc-net.service lxc-apparmor-load
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
$(INSTALL_DATA) lxc.service lxc@.service lxc-net.service $(DESTDIR)$(SYSTEMD_UNIT_DIR)/
@@ -18,7 +17,7 @@ uninstall-systemd:
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/lxc-net.service
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) || :
pkglibexec_SCRIPTS = lxc-devsetup lxc-apparmor-load
pkglibexec_SCRIPTS = lxc-apparmor-load
install-data-local: install-systemd
uninstall-local: uninstall-systemd

View File

@@ -30,6 +30,8 @@ if ! type action >/dev/null 2>&1; then
fi
start() {
# Setup host /dev for autodev containers.
@LIBEXECDIR@/lxc/lxc-devsetup
action $"Starting LXC autoboot containers: " @LIBEXECDIR@/lxc/lxc-containers start
}

View File

@@ -45,6 +45,9 @@ pre-start script
fi
fi
# Setup host /dev for autodev containers.
@LIBEXECDIR@/lxc/lxc-devsetup
[ "x$LXC_AUTO" = "xtrue" ] || exit 0
if [ -n "$BOOTGROUPS" ]

View File

@@ -650,6 +650,7 @@ AC_CONFIG_FILES([
config/init/sysvinit/Makefile
config/init/sysvinit/lxc-containers
config/init/sysvinit/lxc-net
config/init/upstart/lxc.conf
config/init/upstart/lxc-net.conf
config/init/upstart/Makefile
config/etc/Makefile