Sam,
Thanks for this.
A quick look at sysvinit-core postinst reveals:
restart=yes
if ischroot --default-true ; then
restart=no
fi
if [ -n "${DPKG_ROOT:-}" ]; then
restart=no
fi
# If systemd is running, don't restart init or doing any initctl
# migration.
if [ -d "$DPKG_ROOT/run/systemd/system" ]; then
restart=no
fi
if [ "$(uname -s)" = "GNU" ]; then
restart=no
fi
if [ "$restart" = "yes" ]; then
do_restart
else
echo "Not restarting sysvinit"
fi
My initial thought is that restart should really be 'no' if it is a new
sysvinit-core installation. The attached patch fixes sysvinit-core installation
within a podman container for me. I need to do more testing to check that it
doesn't cause breakage elsewhere.
Can you confirm?
Thanks
Mark
>From a14a542cf08db3ef53a154d0366e873375662f4a Mon Sep 17 00:00:00 2001
From: Mark Hindley <[email protected]>
Date: Mon, 22 Jan 2024 16:45:11 +0000
Subject: [PATCH] d/sysvinit-core.postinst: don't do_restart() for new
installations.
Closes: #1061280
---
debian/sysvinit-core.postinst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/debian/sysvinit-core.postinst b/debian/sysvinit-core.postinst
index ecb27a5b..d0ac5841 100755
--- a/debian/sysvinit-core.postinst
+++ b/debian/sysvinit-core.postinst
@@ -112,6 +112,9 @@ fi
restart=yes
+if [ -z "${oldver}" ]; then
+ restart=no
+fi
if ischroot --default-true ; then
restart=no
fi
--
2.39.2