Re: Starting services in runlevels 0 and 6

2006-10-14 Thread Petter Reinholdtsen

[Christian Perrier]
 From what I see, having this will not happen for etch. Do you think it
 could be a release goal for etch+1?

I believe it should be a release goal for etch+1 to switch sysv-rc to
use a dependency based sequencing, yes.

 With that already decided and widely accepted, it wouldn't probably
 be very hard to begin a campaign to make packages include dependency
 information just after we release etch

It is already happening, so I am confident we will get even more
scripts to include those headers after Etch.  The nice thing about the
change is that it only add a comment to the script, so the change is
very low-risk.  Lintian already give a warning for init.d scripts
without these headers, and this help a lot of maintainers to notice
the problem.

Friendly,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Starting services in runlevels 0 and 6

2006-10-14 Thread Petter Reinholdtsen

[Jörg Sommer]
 It was pointed out to me, that even the scripts starting with S are 
 called with argument 'stop' for runlevels 0 and 6 by /etc/init.d/rc. 
 However, the reason why it is implemented that way is still not clear.

 Because the S scripts are run after the K scripts. This way it is
 possible to run special scripts at very last.

Well, it is not really a good explanation, as the ordering of K01 S01
could also be done with K01 K02.  No need to use start-symlinks as
stop scripts to get the proper ordering.  I've been told that the
sysv-rc system behave the way it does because Solaris did it when the
Debian boot system was written, and it was used as the example.  I
guess that is as good explanation as any on the historical reasons for
the strange setup in the Debian boot system.

Friendly,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Starting services in runlevels 0 and 6

2006-10-13 Thread Josselin Mouette
Le jeudi 12 octobre 2006 à 20:33 -0700, Jurij Smakov a écrit :
 It was pointed out to me, that even the scripts starting with S are 
 called with argument 'stop' for runlevels 0 and 6 by /etc/init.d/rc. 
 However, the reason why it is implemented that way is still not clear.

IIRC, it is so that they are executed after the scripts starting with K.
-- 
 .''`.   Josselin Mouette/\./\
: :' :   [EMAIL PROTECTED]
`. `'[EMAIL PROTECTED]
   `-  Debian GNU/Linux -- The power of freedom



Re: Starting services in runlevels 0 and 6

2006-10-13 Thread Petter Reinholdtsen

[Henrique de Moraes Holschuh]
 On Thu, 12 Oct 2006, Jurij Smakov wrote:
 It was pointed out to me, that even the scripts starting with S are 
 called with argument 'stop' for runlevels 0 and 6 by /etc/init.d/rc. 
 However, the reason why it is implemented that way is still not clear.

 Braindamage inherited from SysV.

Yes, historical reasons.  And it isn't even required.  SuSe for
example only store K* type symlinks in those directories, instead of
handling them specially.

We can do the same, if we switch to a dependency based init.d system,
but the current symlinks need to be renamed when that happen.  The
insserv package provide a script to do this while it reorders the boot
sequence based on the LSB header dependency info.  It is not enough to
just rename them, as all postinst script call update-rc.d with other
assumptions, and the shutdown order will be wrong unless the sequence
numbers are changed as well.

The brave can try to install insserv and run

  BAD_INSSERV_HACKER=true dpkg-reconfigure insserv

to enable the dependency based boot.  But remember, if it break you
get to keep both the pieces.  Running it again and disabling the
dependency based boot might be possible, but there is no guarantee.

The reason this might break is that several init.d scripts are missing
dependency information, so the boot order generated by insserv might
be incorrect.  insserv include override files for some of these
scripts, for the base system and a normal desktop install, but there
are probably hundred of init.d scripts without known dependency info.

I use it myself on one of my test machines, and it works for me.  But
I have added override files for the packages I use. :)

I would like us to switch to a dependency based boot sequence system
after Etch.  First all init.d scripts need to include dependency info.
Next, we need to locate and fix any dependency loops.  Last we can
automate the switch to dependency based sequencing, possible only on
new installations and when the system administrator decide to convert.

The nice thing about documenting dependencies is that we can
automatically detect bugs in the current boot sequence.  We already
found and fixed a few of those with the info currently in the
packages. :)

Friendly,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Starting services in runlevels 0 and 6

2006-10-13 Thread Jörg Sommer
Hello Jurij,

Jurij Smakov [EMAIL PROTECTED] wrote:
 On Thu, Oct 12, 2006 at 07:34:19PM -0700, Jurij Smakov wrote:
 /etc/rc0.d/S30urandom
 /etc/rc0.d/S35networking
 /etc/rc0.d/S36ifupdown
 /etc/rc0.d/S37sendsigs (start action for this one is a no-op)
 /etc/rc0.d/S48cryptdisks 
 /etc/rc0.d/S59cryptdisks-early
 
 and similar stuff in /etc/rc6.d. I cannot find a rational explanation 
 for starting services right before shutdown. Is it intentional, or are 
 those just bugs?

 It was pointed out to me, that even the scripts starting with S are 
 called with argument 'stop' for runlevels 0 and 6 by /etc/init.d/rc. 
 However, the reason why it is implemented that way is still not clear.

Because the S scripts are run after the K scripts. This way it is
possible to run special scripts at very last.

Bye, Jörg.
-- 
Life can only be understood backwards, but it must be lived forwards.
 (Soren Kierkegaard)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Starting services in runlevels 0 and 6

2006-10-13 Thread Christian Perrier

 The reason this might break is that several init.d scripts are missing
 dependency information, so the boot order generated by insserv might
 be incorrect.  insserv include override files for some of these


From what I see, having this will not happen for etch. Do you think it
could be a release goal for etch+1?

With that already decided and widely accepted, it wouldn't probably be
very hard to begin a campaign to make packages include dependency
information just after we release etch




signature.asc
Description: Digital signature


Re: Starting services in runlevels 0 and 6

2006-10-12 Thread Jurij Smakov
On Thu, Oct 12, 2006 at 07:34:19PM -0700, Jurij Smakov wrote:
 Greetings,
 
 I've accidentally noticed that there are a few services which are 
 *started* when entering runlevels 0 and 6 (halt and reboot, 
 respectively). For example, on my mostly up-to-date sid system I have:
 
 /etc/rc0.d/S30urandom
 /etc/rc0.d/S35networking
 /etc/rc0.d/S36ifupdown
 /etc/rc0.d/S37sendsigs (start action for this one is a no-op)
 /etc/rc0.d/S48cryptdisks 
 /etc/rc0.d/S59cryptdisks-early
 
 and similar stuff in /etc/rc6.d. I cannot find a rational explanation 
 for starting services right before shutdown. Is it intentional, or are 
 those just bugs?

It was pointed out to me, that even the scripts starting with S are 
called with argument 'stop' for runlevels 0 and 6 by /etc/init.d/rc. 
However, the reason why it is implemented that way is still not clear.

Best regards,
-- 
Jurij Smakov   [EMAIL PROTECTED]
Key: http://www.wooyd.org/pgpkey/  KeyID: C99E03CC


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Starting services in runlevels 0 and 6

2006-10-12 Thread Henrique de Moraes Holschuh
On Thu, 12 Oct 2006, Jurij Smakov wrote:
 It was pointed out to me, that even the scripts starting with S are 
 called with argument 'stop' for runlevels 0 and 6 by /etc/init.d/rc. 
 However, the reason why it is implemented that way is still not clear.

Braindamage inherited from SysV.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]