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

Signed-off-by: Fabian Grünbichler <f.gruenbich...@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


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to