[Reportbug-maint] Bug#741930: reportbug: add current init system information

Cameron Norman camerontnorman at gmail.com
Wed Nov 5 01:09:27 UTC 2014

On Tue, Nov 4, 2014 at 5:35 AM, Sandro Tosi <morph at debian.org> wrote:
> Hi Michael et al,
> On Mon, Nov 3, 2014 at 1:19 PM, Michael Biebl <biebl at debian.org> wrote:
>>> provided above one requires to check a dir existence and the checking
>>> a command and then execute it to parse its output. it seems a bit
>>> fragile, and maybe only upstart check really the running processes
>> The systemd system runtime directory is only created when systemd is the
>> active PID 1. Could you elaborate why you think this approach is
>> fragile? If those two tests (for systemd and upstart) would be brittle,
>> we'd have a problem, since they are used all over the place.
> well, mkdir can create it too :) but ok, those checks are so embedded
> that i can ignore if the reportbug check if fooled to thing theres
> another systems (there will be bigger problems indeed) so I will just
> mimik their logic in the code; I changed the sample scripts, attached,
> and it would be nice if you all could give it another round (thanks to
> everyone who already did!) in particular to those having an upstart
> init system.

A few notes I have:

1. With Jessie and on, with sysvinit /sbin/init //will// be a link,
not the true init file. This would lead to unknowns when the init was
actually sysv.
2. With Upstart, /sbin/init is not a link, so that third test would
give a false positive for sysvinit when it was actually Upstart
(assuming the Upstart check gave a false negative).
3. Maybe you should embed the check for Upstart, so that you do not
have to source all of the init functions, and if that file is ever not
available you still get the correct check.
4. There is a tiny typo in the Upstart check. It needs an extra right
parenthese at the end of the message.

Cameron Norman

More information about the Reportbug-maint mailing list