lxc: export systemd cgroups after install
authorMichal Vasilek <michal.vasilek@nic.cz>
Wed, 8 Jun 2022 12:48:22 +0000 (14:48 +0200)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Fri, 24 Jun 2022 10:16:43 +0000 (12:16 +0200)
otherwise, a user would have to either manually run /etc/init.d/lxc-auto
boot or reboot the system to start using lxc.

originally committed in 2cde10b95053bf958a4001fb0a82c4563bf345e2
reverted in 039912dec5d3ba2b0f6f53ab8330ab9fea2f7adf

Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
utils/lxc/Makefile

index 19fd00f5ec49456a12b9d1f3630af69076ec06f2..b87bfe9992d20dd9b62770c5903ea52448fb503c 100644 (file)
@@ -61,6 +61,10 @@ define Package/lxc-auto
   DEPENDS+=+lxc-start +lxc-stop
 endef
 
+define Package/lxc-auto/postinst
+[ -n "$${IPKG_INSTROOT}" ] || [ "$${PKG_UPGRADE}" = 1 ] || /etc/init.d/lxc-auto boot
+endef
+
 define Package/lxc-auto/description
  LXC is the userspace control package for Linux Containers, a lightweight
  virtual system mechanism sometimes described as "chroot on steroids".