Making it possible to uninstall initscripts / insserv and facilities

Michael Biebl biebl at debian.org
Wed Nov 25 15:13:47 GMT 2015


Am 25.11.2015 um 00:06 schrieb Felipe Sateler:
> On 24 November 2015 at 18:57, Felipe Sateler <fsateler at debian.org> wrote:
>> On 24 November 2015 at 18:28, Michael Biebl <biebl at debian.org> wrote:
>>> Am 24.11.2015 um 22:25 schrieb Petter Reinholdtsen:
>>>> [Felipe Sateler]
>>>>> That would potentially leave initscripts with wrong ordering, thus
>>>>> breaking a boot back to sysvinit (via syvinit package).
>>>>
>>>> My guess is that this would not happen if the initscripts package is
>>>> installed before trying to boot using sysvinit, which I suspect is a
>>>> requirement.  The initscripts postinst script calls update-rc.d which
>>>> would call insserv to fix the ordering.  Is my guess wrong?
>>>
>>> Afaiu, Felipe's point was, that initscripts could be installed, but
>>> systemd the active PID 1.
>>> So switching to sysvinit as active init would not necessarily re-trigger
>>> a insserv run.
>>
>> Exactly, and the added --force would mask a bug somewhere in the init scripts.
>>
>>
>>> What check did you have in mind here? Testing for a (conf)file shipped
>>> by the initscripts package?
>>
>> Right. Either that or shelling out to dpkg-query, but testing for
>> /etc/init.d/mountkernfs.sh (the most depended upon service) would be
>> good as well.
> 
> Would it be a problem to invoke insserv with -f on remove or disable?
> It would appear it isn't, as the debhelper autoscripts do || true on
> failure of update-rc.d remove. If so, the change would be very simple:
> 
> diff --git a/debian/src/sysv-rc/sbin/update-rc.d
> b/debian/src/sysv-rc/sbin/update-rc.d
> index a631021..55cd5b0 100755
> --- a/debian/src/sysv-rc/sbin/update-rc.d
> +++ b/debian/src/sysv-rc/sbin/update-rc.d
> @@ -168,6 +168,10 @@ sub insserv_updatercd {
> 
>     usage("not enough arguments") if ($#args < 1);
> 
> +    # Add force flag if initscripts is not installed
> +    # This enables inistcripts-less systems to not fail when a
> facility is missing
> +    unshift(@opts, '-f') unless -f '/etc/init.d/mountkernfs.sh';
> +
>     $scriptname = shift @args;
>     $action = shift @args;
>     my $insserv = "/usr/lib/insserv/insserv";


Martin, any objections to this approach in general and this patch
specifically?

If not, could you Felipe please file a bug against sysv-rc?

Regards,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20151125/63aac684/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list