* martin f krafft ([EMAIL PROTECTED]) [021121 07:56]: > also sprach Vineet Kumar <[EMAIL PROTECTED]> [2002.11.18.2327 +0100]: > > The Debian Way is as follows: > > wrong. use update-rc.d, and yes, i did read the manpage. you method > fails for folks running file-rc, amongst others. > > there is nothing to top you from doing the equivalent of > > > # ln -s /etc/init.d/xdm /etc/rc4.d/K99xdm > > with update-rc.d: > > update-rc.d xdm stop 01 0 1 6 . stop 99 2 3 4 5 . > > this will not get overwritten as it does exactly what you did with all > the shell commands, except it works for all startup script management > systems, and it is The Debian Way. > > yours works (for SysV), but it isn't The Debian Way, at least not with > caps...
True; it was inappropriate for me to make such a claim, especially when (in the same breath, no less) denouncing the "update-rc.d xdm -f remove" way. Unfortunately, using update-rc.d as shown above will do nothing without -f; update-rc.d will complain that startup scripts already exist. This is precisely to protect the customizations made by the sysadmin, as I indicated in my previous post. That the script needs to be told to "force" in order to overwrite changes made by the local sysadmin leads me to infer that the intended way for the sysadmin to make changes is external to update-rc.d, whose function, it seems to me, is to be called from postinst and postrm (when purging) scripts. In order for update-rc.d to actually do anything in this case, it must first be told to "force remove" all links and then you can re-create them with update-rc.d. And then, the system will end up in exactly the state the OP was complaining about in the first place: each time the system is leaving runlevel 2, it will try to shut down a non-running xdm (a cosmetic blemish each time he shuts the system down). The way to make it not do that is to manually remove the K link from /etc/rc2.d (or the equivalent in file-rc, with which I am not familiar). With update-rc.d, that means asking it to "force remove" all the links and then create just one, like "update-rc.d xdm 99 stop 4 ." I think that if there is a Debian Way to control the runlevel boot sequence, it is either with /bin/ln and /bin/rm (in the case of sysvinit) or $EDITOR (in the case of file-rc). It's best that update-rc.d is not simply an over-featured frontend to rm and ln, since it increases its usefulness as a package maintainers' tool, since it can't easily be (accidentally or not) mis-used to overwrite existing configurations. (Can you tell I was once a very angry redhat user? ;-) good times, Vineet -- http://www.doorstop.net/ -- http://www.eff.org/
msg14728/pgp00000.pgp
Description: PGP signature