[pve-devel] [PATCH ha-manager] postinst: check whether the system is managed by systemd
Maximiliano Sandoval
m.sandoval at proxmox.com
Fri Feb 28 13:57:37 CET 2025
..before running systemctl. Allows for building packages in containers
not managed by systemd.
Signed-off-by: Maximiliano Sandoval <m.sandoval at 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
More information about the pve-devel
mailing list