From 8988434060db9f2af961edb6a5a92d09f64e4ac2 Mon Sep 17 00:00:00 2001 From: Davide Principi Date: Fri, 28 Jun 2024 17:01:32 +0200 Subject: [PATCH] Fix regression of bugfix 6959 The 10setup script terminates with a non-zero exit code at module installation time. The shell AND causes a non-zero exit code if the service is not enabled. --- imageroot/update-module.d/10setup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imageroot/update-module.d/10setup b/imageroot/update-module.d/10setup index a2f8c5b..5bd356d 100755 --- a/imageroot/update-module.d/10setup +++ b/imageroot/update-module.d/10setup @@ -16,4 +16,6 @@ mkdir -p dnsmasq.d dnsmasq_hosts.d install -m 644 ../dnsmasq.service "/etc/systemd/system/${MODULE_ID}.service" systemctl daemon-reload # Restart the service, if the module has been configured: -systemctl -q is-enabled "${MODULE_ID}" && systemctl restart -T "${MODULE_ID}" +if systemctl -q is-enabled "${MODULE_ID}"; then + systemctl restart -T "${MODULE_ID}" +fi