Re: File naming of scripts in /etc/init.d

2012-06-27 Thread Steve R. Petruzzello

Dear all,

Thank you for your answers.


Le 25-06-2012, à 15:21:02 +0100, Roger Leigh (rle...@codelibre.net) a écrit :

 On Mon, Jun 25, 2012 at 03:59:30PM +0200, Steve R. Petruzzello wrote:
  Le 25-06-2012, à 14:47:58 +0100, Roger Leigh (rle...@codelibre.net) 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). 
 
 No, it's not a strict rule, just historic practice.  If we were to
 do it over today, it's unlikely we would use the suffixed names.


So my question was not too stupid :)


Best regards,
Steve


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120627084604.GA8811@localhost



File naming of scripts in /etc/init.d

2012-06-25 Thread Steve R. Petruzzello

Hi,

I noticed that some scripts in /etc/init.d/ are suffixed by .sh and some are
not. On my sytem:

host:/etc/init.d# ls -1 *.sh
bootmisc.sh
checkfs.sh
checkroot.sh
console-screen.sh
hostname.sh
hwclock.sh
keymap.sh
mountall-bootclean.sh
mountall.sh
mountdevsubfs.sh
mountkernfs.sh
mountnfs-bootclean.sh
mountnfs.sh
mtab.sh
umountnfs.sh

All except console-screen.sh, hwclock.sh and keymap.sh are from the initscripts
package.

I was wandering if there was a reason from this discrepancy. So I had a look in
the Debian Policy Manuel, and one can read (subsection 9.3.2 Writing the
scripts) that These scripts should be named /etc/init.d/package. I failed to
find another reference to script naming in the rest of the document.

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?  

Would it be purely aesthetics to clean out these script names? 

Thank you for the great job.

Best regards,
Steve


PS: Is there a way to list all packages putting a file in /etc/init.d/? 


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120625115136.GA27673@localhost



Re: File naming of scripts in /etc/init.d

2012-06-25 Thread Steve R. Petruzzello
Le 25-06-2012, à 14:47:58 +0100, Roger Leigh (rle...@codelibre.net) 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.

Sure.

  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.


Thanks,
Steve


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120625135929.GA16892@localhost