Package: sysv-rc Version: 2.88dsf-55 Tags: patch User: [email protected] Usertags: origin-ubuntu ubuntu-patch utopic
Hello, When running under systemd and a package only has an upstart job and a systemd unit, the "testexec" in invoke-rc.d will be false and is_upstart as well, thus the actions are never run in this case. This causes invoke-rc.d to just exit with code 102 without actually doing anything. I realize that this is a corner case in Debian as packages are required to have an init.d script; but it currently is quite common in Ubuntu, so it would be nice if this could be fixed in Debian as well. It's also quite an obvious omission from the "if" statement, as the subsequent inner case distinction between the init systems includes is_systemd as well. Patch attached against current packaging git. Thanks for considering, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
From 52fb58ef83a5fcdfc2d55af806a10bce9676b12e Mon Sep 17 00:00:00 2001 From: Martin Pitt <[email protected]> Date: Mon, 12 May 2014 10:13:17 +0200 Subject: [PATCH] invoke-rc.d: Fix actions to run under systemd if there is no init.d script When running under systemd and a package only has an upstart job and a systemd unit, the "testexec" will be false and is_upstart as well, thus the actions are never run in this case. Add the missing "is_systemd" check for this. --- debian/changelog | 4 ++++ debian/src/sysv-rc/sbin/invoke-rc.d | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0c52c10..9beb398 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,10 @@ sysvinit (2.88dsf-56) UNRELEASED; urgency=medium claim sysvinit have never been used on hurd. It is not true any more. + [ Martin Pitt ] + * invoke-rc.d: Fix actions to run under systemd if there is no init.d + script. + -- Dimitri John Ledkov <[email protected]> Tue, 22 Apr 2014 14:41:18 +0100 sysvinit (2.88dsf-55) experimental; urgency=medium diff --git a/debian/src/sysv-rc/sbin/invoke-rc.d b/debian/src/sysv-rc/sbin/invoke-rc.d index cdfc8d8..2ce4abc 100644 --- a/debian/src/sysv-rc/sbin/invoke-rc.d +++ b/debian/src/sysv-rc/sbin/invoke-rc.d @@ -464,7 +464,7 @@ fi ## note that $ACTION is a space-separated list of actions ## to be attempted in order until one suceeds. if test x${FORCE} != x || test ${RC} -eq 104 ; then - if [ -n "$is_upstart" ] || testexec "${INITDPREFIX}${INITSCRIPTID}" ; then + if [ -n "$is_upstart" ] || [ -n "$is_systemd" ] || testexec "${INITDPREFIX}${INITSCRIPTID}" ; then RC=102 setechoactions ${ACTION} while test ! -z "${ACTION}" ; do -- 2.0.0.rc0
signature.asc
Description: Digital signature
_______________________________________________ Pkg-sysvinit-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-sysvinit-devel

