[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#353659: lintian: Check for direct use of init.d, when invoke-rc.d should be used instead



> It would be nice if lintian would warn if maintainer scripts use the
> init.d script directly and not via invoke-rc.d. Checking that the string
> "/etc/init.d/" exists but "invoke-rc.d" does not might be a good enough
> approximation to catch most such problems.

I did a quick check using the attached shell script to find potentially bad postinst
files. It found, in sarge/main/i386, 134 binary packages that call an init.d script (not
always their own) with a start or restart argument, but don't use invoke-rc.d if it is
available. I then checked the results manually and found that there were only two 
false positives: php4-tclink and uif. Both tell the user how to run the init.d script
but don't do it themselves.

I thus conclude that the test in the script is pretty good. I don't have the time right
now to implement this as a lintian check, but I hope that may happen by someone else's
efforts (or mine, at some future date).

-- 
Those who do, decide.

Attachment: find-lack-of-invoke
Description: application/shellscript


Reply to: