..before running systemctl. Allows for building packages in containers
not managed by systemd.

Signed-off-by: Maximiliano Sandoval <m.sando...@proxmox.com>
---
 debian/pve-ha-manager.postinst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/pve-ha-manager.postinst b/debian/pve-ha-manager.postinst
index 5c8f0cd..220123f 100644
--- a/debian/pve-ha-manager.postinst
+++ b/debian/pve-ha-manager.postinst
@@ -4,7 +4,7 @@ set -e
 
 #DEBHELPER#
 
-if [ "$1" = "triggered" ]; then
+if [ "$1" = "triggered" ] && [ -d "/run/systemd/system" ]; then
     if systemctl --quiet is-active pve-ha-lrm.service; then
       deb-systemd-invoke reload-or-try-restart pve-ha-lrm.service || true
     fi
-- 
2.39.5



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

Reply via email to