[pve-devel] [PATCH lxc 2/2] postinst: reload/restart lxc.service later

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Nov 6 11:08:54 CET 2019


since the debhelper-generated default enabling should come before we
attempt to start/reload/restart it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 debian/lxc-pve.postinst | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/lxc-pve.postinst b/debian/lxc-pve.postinst
index 776b0b6..320b89f 100644
--- a/debian/lxc-pve.postinst
+++ b/debian/lxc-pve.postinst
@@ -14,8 +14,6 @@ case "$1" in
 	# create subuid/subgui map for root
 	# (to run unprivileged containers as root)
 	usermod -v 100000-165535 -w 100000-165535 root
-
-	deb-systemd-invoke reload-or-try-restart lxc.service >/dev/null || true
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
@@ -32,4 +30,10 @@ esac
 
 #DEBHELPER#
 
+if [ "$1" = "configure" ] ; then
+        if [ -d /run/systemd/system]; then
+                deb-systemd-invoke reload-or-try-restart lxc.service >/dev/null || true
+        fi
+fi
+
 exit 0
-- 
2.20.1





More information about the pve-devel mailing list