Skip to content

Commit

Permalink
Execute script lxc-devsetup also with sysvinit and upstart.
Browse files Browse the repository at this point in the history
  * 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>
  • Loading branch information
clopez committed Mar 4, 2016
1 parent 6861fb2 commit a8c7106
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/init/common/Makefile.am
@@ -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
File renamed without changes.
5 changes: 2 additions & 3 deletions config/init/systemd/Makefile.am
@@ -1,5 +1,4 @@
EXTRA_DIST = \
lxc-devsetup \
lxc-apparmor-load \
lxc.service.in \
lxc@.service.in \
Expand All @@ -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)/

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions config/init/sysvinit/lxc-containers.in
Expand Up @@ -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
}

Expand Down
Expand Up @@ -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" ]
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -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
Expand Down

0 comments on commit a8c7106

Please sign in to comment.