lxc: export systemd cgroups after install
authorMichal Vasilek <michal.vasilek@nic.cz>
Fri, 8 Apr 2022 20:49:53 +0000 (22:49 +0200)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Sun, 15 May 2022 05:29:39 +0000 (07:29 +0200)
otherwise, a user would have to either manually run /etc/init.d/lxc-auto
boot or reboot the system to start using lxc.

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
(cherry picked from commit 2cde10b95053bf958a4001fb0a82c4563bf345e2)

utils/lxc/Makefile

index 18177008188abce9f518468c2aee6de437f7941d..c45ecc5f9190e4838a2ef3b1e67a82dd35362ceb 100644 (file)
@@ -177,6 +177,10 @@ define Package/lxc-auto/install
        $(INSTALL_BIN) ./files/lxc-auto.init $(1)/etc/init.d/lxc-auto
 endef
 
+define Package/lxc-auto/postinst
+[ "$${PKG_UPGRADE}" = "0" ] && /etc/init.d/lxc-auto boot
+endef
+
 define Package/lxc-common/conffiles
 /etc/lxc/default.conf
 /etc/lxc/lxc.conf