[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: why does it look at xdm and kdm while shutting down?



* Matthias Hentges (eebe@gmx.net) [021118 08:27]:
> Am Mon, 2002-11-18 um 13.52 schrieb Sandip P Deshmukh:
> > hello all
> > 
> > my inittab sets the runlevel to 2.
> > 
> > in /etc/rc2.d, there were links referring to files in /etc/init.d
> > directory.
> > 
> > i did not want xdm, kdm, gdm to start. so i changed the link names from
> > SnnProgram to KnnProgram for these links.
> > 
> > however, while shutting down, it still looks for xdm, kdm, etc. it is
> > not doing me any harm, i find it unelegant that the system tries to shut
> > down programs it had not started in the beginning.
> > 
> 
> Just delete the xdm and kdm scripts from runlevel 2.
> I know there is a Debian Way (TM) to do this, but i can't remember how
> ATM ;)

The Debian Way is as follows:

# rm -f /etc/rc2.d/[SK]??[xk]dm

Then, 

% ls /etc/rc?.d/[SK]??xdm || echo boo kdm
% ls /etc/rc?.d/[SK]??kdm || echo boo xdm

and if you get any boos, create a link for the corresponding program
with something like

# ln -s /etc/init.d/xdm /etc/rc4.d/K99xdm
and/or
# ln -s /etc/init.d/xdm /etc/rc4.d/K99kdm

Where 4 is any runlevel you want, from 2-5.

using "update-rc.d -f remove kdm" (as someone will no doubt suggest,
claiming it to be the Debian Way without having read the manpage) will
get you into the "boo" state.  This is bad because next time update-rc.d
is run (legitimately, from a package's postinst script) it will
re-create the missing links for you, thinking that this package is being
newly installed rather than upgraded.  Boo.  If update-rc.d sees that
you have any [SK] links in /etc/rc?.d/, it can see that you, the
sysadmin, have customized your boot process and will respect those
changes throughout all future upgrades.

good times,
Vineet

-- 
http://www.doorstop.net/
-- 
http://www.anti-dmca.org/	

Attachment: pgp4Ucs400EXg.pgp
Description: PGP signature


Reply to: