Control: tag -1 patch Hi, i would propose a patch like this - Usage of telinit shameless stolen from glibc which calls telinit like this to restart init.
Otherwise we would need to check for the existance and executability of telinit (Which might be missing in container environments) Flo -- Florian Lohoff [email protected] UTF-8 Test: The 🐈 ran after a 🐁, but the 🐁 ran away
commit 37234b78955546b2e7c6dcb62f014d2f924d9657 Author: Florian Lohoff <[email protected]> Date: Fri Feb 22 16:08:20 2019 +0100 Replace unconditional kill -s -HUP 1 with telinit q diff --git a/debian/daemontools-run.postinst b/debian/daemontools-run.postinst index 065d821..aeab95c 100644 --- a/debian/daemontools-run.postinst +++ b/debian/daemontools-run.postinst @@ -31,8 +31,7 @@ if test -z "$2" || dpkg --compare-versions "$2" lt '1:0.76'; then sed -e '/#-- daemontools-run begin/,/#-- daemontools-run end/d' \ /etc/inittab > /etc/inittab'{new}' mv -f /etc/inittab'{new}' /etc/inittab - kill -s HUP 1 - sleep 1 + telinit q 2>/dev/null || true ; sleep 1 fi # update from daemontools-installer if grep -q 'SV:123456:respawn:/command/svscanboot' /etc/inittab; then @@ -41,8 +40,7 @@ if test -z "$2" || dpkg --compare-versions "$2" lt '1:0.76'; then sed -e '/SV:123456:respawn:\/command\/svscanboot/d' \ /etc/inittab > /etc/inittab'{new}' mv -f /etc/inittab'{new}' /etc/inittab - kill -s HUP 1 - sleep 1 + telinit q 2>/dev/null || true ; sleep 1 fi # update from daemontools-installer (fhs version) if grep -q 'SV:123456:respawn:/usr/bin/svscanboot' /etc/inittab; then @@ -51,8 +49,7 @@ if test -z "$2" || dpkg --compare-versions "$2" lt '1:0.76'; then sed -e '/SV:123456:respawn:\/usr\/bin\/svscanboot/d' \ /etc/inittab > /etc/inittab'{new}' mv -f /etc/inittab'{new}' /etc/inittab - kill -s HUP 1 - sleep 1 + telinit q 2>/dev/null || true ; sleep 1 fi fi if test -z "$2"; then @@ -80,7 +77,7 @@ if ! grep '^SV:' /etc/inittab >/dev/null; then #-- daemontools-run end EOT mv -f /etc/inittab'{new}' /etc/inittab - kill -s HUP 1 + telinit q 2>/dev/null || true ; sleep 1 fi # systemd service diff --git a/debian/daemontools-run.postrm b/debian/daemontools-run.postrm index d27eef5..5ee83ed 100644 --- a/debian/daemontools-run.postrm +++ b/debian/daemontools-run.postrm @@ -9,7 +9,7 @@ if grep -q "#-- daemontools-run begin" /etc/inittab; then sed -e '/#-- daemontools-run begin/,/#-- daemontools-run end/d' \ /etc/inittab > /etc/inittab'{new}' mv -f /etc/inittab'{new}' /etc/inittab - kill -s HUP 1 || : + telinit q 2>/dev/null || true ; sleep 1 echo 'Sending services the TERM and CONT signals...' svc -dx /etc/service/* || : sleep 5
signature.asc
Description: PGP signature

