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

2014-02-05 Thread Petter Reinholdtsen
[Benda]
> What a history! Provided that all the scripts are executed, is there
> any plan to strip the .sh suffix?

Not from me, at least.  The advantage would be purely cosmetic, and
the effort to make sure every upgrade problem is handled would be
significant.  But new scripts will not get the .sh ending, and in
time, I guess the current init.d/*.sh scripts will become obsolete and
go away.

-- 
Happy hacking
Petter Reinholdtsen


-- 
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/20140205115808.gp13...@ulrik.uio.no



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

2014-02-05 Thread heroxbd
Petter Reinholdtsen  writes:

> Before concurrent running of init.d scripts were implemented in sysv-rc,
> the .sh scripts would be sourced by /etc/init.d/rc and /etc/init.d/rcS
> while the non-.sh scripts would be executed.  This distinciton were
> removed when sysv-rc started to run scripts in parallell, as it no
> longer made sense.

What a history! Provided that all the scripts are executed, is there any
plan to strip the .sh suffix?


-- 
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/86zjm5yexc@moguhome00.in.awa.tohoku.ac.jp



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

2014-02-04 Thread Petter Reinholdtsen

I noticed someone was wrong on the Internet, and decided to follow up on
this old thread.

[Steve R. Petruzzello]
> 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?

Before concurrent running of init.d scripts were implemented in sysv-rc,
the .sh scripts would be sourced by /etc/init.d/rc and /etc/init.d/rcS
while the non-.sh scripts would be executed.  This distinciton were
removed when sysv-rc started to run scripts in parallell, as it no
longer made sense.

> So my question was not too stupid :)

Not at all. :)

-- 
Happy hacking
Petter Reinholdtsen


-- 
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/2fl61oua1na@diskless.uio.no



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



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

2012-06-25 Thread Roger Leigh
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.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linuxhttp://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-GPG Public Key  F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


-- 
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/20120625142102.gq9...@codelibre.net



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



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

2012-06-25 Thread Simon McVittie
On 25/06/12 14:47, Roger Leigh wrote:
> On Mon, Jun 25, 2012 at 01:51:36PM +0200, Steve R. Petruzzello wrote:
>> PS: Is there a way to list all packages putting a file in /etc/init.d/? 
> 
> dpkg -S $(ls -1 /etc/init.d/*)

Or if you want the complete set, not just those you have installed,
install apt-file and run:

apt-file update
apt-file search /etc/init.d

Regards,
S


-- 
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/4fe86e32.3070...@debian.org



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

2012-06-25 Thread Roger Leigh
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
- 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/*)


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linuxhttp://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-GPG Public Key  F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


-- 
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/20120625134758.gp9...@codelibre.net



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

2012-06-25 Thread Tanguy Ortolo
Steve R. Petruzzello, 2012-06-25 13:51+0200:
> 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 […] 2) some scripts are not named by
> their package's name (hwclock.sh is part of the util-linux package).

About this specific point, while it is relevant to name scripts by the
name of their package, I do not think it should be too strict. Such a
recommendation exists to maintain a bit of order and to avoid conflicts.
However, there are examples of scripts which have a logical name which
is distinct from the name of their package, typically hwclock.sh.

-- 
 ,--.
: /` )   Tanguy Ortolo  
| `-'Debian Developer
 \_


-- 
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/js9l85$sc$1...@dough.gmane.org



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

2012-06-25 Thread Vincent Zweije
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. On my sytem:

[...]

||  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?  

IIRC, in the olden unix times scripts with a .sh suffix were sourced
(using ". /etc/init.d/foo.sh") by the main rc shell script instead of
executed (using "/etc/init.d/foo.sh") to save the spawning of a separate
shell, for a little speed.

Nowadays, this is probably no longer necessary. Although, with embedded
stuff, you never know.

Ciao.   Vincent.
-- 
Vincent Zweije| "If you're flamed in a group you
  | don't read, does anybody get burnt?"
[Xhost should be taken out and shot] |-- Paul Tomblin on a.s.r.


signature.asc
Description: Digital signature