Russ Allbery wrote: > Raphael Geissert writes: > >> I planned to send all my init.d-related changes together, but since >> I'm going to have a very busy weekend I might not finish the other >> checks I planned. So, here it is what I've done so far: > > Thanks, applied with some tweaks. >
Thanks. >> commit e61537249dd53ef7195943bd84bad0ee416687e7 >> Author: Raphael Geissert >> <[email protected]> >> Date: Tue Jun 16 15:07:40 2009 -0500 >> >> Don't treat /etc/init.d/README as an init script > > /etc/init.d/skeleton should also be excluded since we don't want to > complain about not registering it. Added. I knew I was missing another file, thanks :) > >> commit f9e8c4cd363e37d9754bf6c610996288b2f75aee >> Author: Raphael Geissert >> <[email protected]> >> Date: Sun Jun 14 21:12:19 2009 -0500 >> >> Check for init scripts with a /usr shebang > > This is not a Policy violation and is not an RC bug, so it's not > severity: serious. It ain't a Policy violation, but under certain conditions it could break the boot or shutdown process. But okay, I probably overinflated the severity and certainty, I should have reviewed it a second time. > Init scripts are not randomly run before /usr is > mounted. Unless they have a broken or incorrect LSB header (which... happens, and hence my urgency on implementing the other check), or they play with the default order values (not that often). > Only rcS scripts need worry about that now, and with > dependency boot systems, only scripts that don't declare a dependency on > the file system. The point about the interpreter possibly being removed > is certainly valid, but /usr/bin/perl is essential. > > I kept the check, since I think it's bad practice to write scripts in > something other than /bin/sh or /bin/bash or something similar, but I > made it normal/possible. I think this one is a little questionable, and > I wonder if it shouldn't be checking for something else entirely or > excluding Perl or something. Checking what then? The init.d-related checks I still plant to write are: * init.d-script-is-foo.sh-but-not-bin-sh Basically making sure *.sh scripts use /bin/sh. This would have been of more use when Policy still stated that script might be sourced. Maybe with a severity/certainty of minor/certain? * init.d-uses-usr-binary-but-no-dependency-on-remote_fs serious/certain? * default-file-contains-not-only-variables-and-comments A check for anything that doesn't match: m/^\s*(?:#|[A-Za-z0-9_]+=|$)/ serious/certain? What do you think? > > It may be that it's rare enough there's no need to worry about it, > though. > I actually don't expect to find any, but who knows; I prefer to add a test to make sure there is none instead of blindly assuming there is none :) Cheers, -- Raphael Geissert - Debian Maintainer www.debian.org - get.debian.net -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

