Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 30327

Summary: shutdown /etc/init.d/* - scripts in reverse order of starting order
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: [OLD] Core systemAssignee: Martin Schlemmer (RETIRED) <azarah>
Status: RESOLVED FIXED    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 31950    
Bug Blocks:    

Description Toralf Förster gentoo-dev 2003-10-04 08:32:31 UTC
The services should stop in the reverse order of theri start order. 

Reproducible: Always
Steps to Reproduce:
1.init 3 
2.init 1 
3. 
Actual Results:  
not all services stop in the reverse order
Comment 1 SpanKY gentoo-dev 2003-10-04 09:51:04 UTC
please show some examples of what you mean ...
Comment 2 Toralf Förster gentoo-dev 2003-10-05 04:31:08 UTC
by default level scripts started in the following order:

sysklogd
apmd
distributed.net
hotplug
irda
kmyfirewall
pcmcia
net.etho (failed, because I am offline)
ntop
ntp-client (failed, needs net.eth0)
ntpd (failed ...)
sendmail
setiathome
slpd (failed ...)
sshd (failed ...)
vcron
xfs
xdm
zetagrid
local


but these scripts are not stoped in the reverse order (I would expect it)
:

local
apmd
distributed.net
kmyfirewall
ntop
sendmail
setiathome
vcron
xdm
zetagrid
sysklogd
hotplug
irdad
pcmcia
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-08 17:00:26 UTC
Why do you expect it ?  If there is no dependency, why should it be started
reverse ?  Remember, we are not working like the rest with S??foo and K??foo,
but with dependencies, thus the startup/shutdown is irrelavant if no dependency
exists ...
Comment 4 Toralf Förster gentoo-dev 2003-10-11 08:18:54 UTC
I am wondering, that the resolved order of the scripts during the start phase
(there are enough dependencies between these init - scripts) does not result
in the reverse order during shutdown, where these dependencies should also
be active.
That meens, if A needs B during start, than B needs to be stopped before
A, isn't it ?
Comment 5 Toralf Förster gentoo-dev 2003-10-11 08:20:34 UTC
>That meens, if A needs B during start, than B needs to be stopped before
>A, isn't it ?

Sorry, I mean : "than B needs to be stopped _after_ A"
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-13 13:11:39 UTC
Yes to comments #4 and #5.  Please include output of 'emerge info'
Comment 7 Toralf Förster gentoo-dev 2003-10-17 10:37:02 UTC
# emerge info
Portage 2.0.49-r13-2 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.22-grsec-1.9.12)
=================================================================
System uname: 2.4.22-grsec-1.9.12 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config
/usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://gentoo.linux.no/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww
mad mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xv zlib
gdbm berkdb slang readline arts svga tcltk java mysql X sdl gpm tcpd pam
ssl perl python esd imlib oggvorbis qt kde motif opengl apache2 innodb mbox
pcmcia slp snmp usb -gtk -gnome -xmms linguas_de"
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-26 13:47:23 UTC
Please see if the fix in bug #31950 fixes this for you.
Comment 9 Toralf Förster gentoo-dev 2003-10-31 12:46:27 UTC
Definitely yes, now it works.

BTW, the resolved dependencies should consider laptop-users who use pcmcia
cards for network connection. Let explain this:

I have a firewall script which formerly) has a depend() like :
use logger
before net

My network script is net.eth0 which has depend():
need hotplug pcmcia

In this case the firewall script was even started after net. All other scripts
which have lines like "use net" are started in the right order. When I changed
the "before net" to "before pcmcia" in my firewall script it also works as
expected.
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-11-02 09:58:17 UTC
This (comment #9) is another bug that I have to fix.  Basically when net.eth0
or whatever is started, it does not consider the dependencies for 'net' ...

Anyhow, I am working on a fix for comment #9, but this bug is already fixed
in CVS.