Re: File naming of scripts in /etc/init.d
Le 25-06-2012, à 14:47:58 +0100, Roger Leigh (email@example.com) a écrit :
> On Mon, Jun 25, 2012 at 01:51:36PM +0200, Steve R. Petruzzello wrote:
> > I noticed that some scripts in /etc/init.d/ are suffixed by .sh and some are
> > not. [...] All except console-screen.sh, hwclock.sh and keymap.sh are from
> > the initscripts package.
> > So 1) nowhere is .sh suffixing mentioned and 2) some scripts are not named by
> > their package's name (hwclock.sh is part of the util-linux package). Is there
> > a reason for this?
> Nowadays, it's essentially the case that
> - scripts with a .sh suffix are run from rcS
But not all scripts in /etc/rcS.d/ have a .sh suffix (for instance S09mdadm-raid).
> - they are not intended to be run by hand and/or after boot, or
> else they can screw up the system state
> > Would it be purely aesthetics to clean out these script names?
> Yes, though the above distinction about them being run from rcS
> would be lost. And given the history, and the fact that other
> scripts depend on them (the names are used in the inter-script
> dependencies), renaming them is do-able, but not something we
> should be doing this close to the freeze.
> > PS: Is there a way to list all packages putting a file in /etc/init.d/?
> dpkg -S $(ls -1 /etc/init.d/*)
Sorry, I was thinking of the whole archive, not only the installed package.