On Wed, Apr 06, 2005 at 02:30:21PM +1000, James wrote:
> when I install something that I may not want to use all the time eg..

Don't do that.  Leave the symlinks in place, but rename from Snn to Knn. 
I've also heard that if you leave at least 1 symlink in place update-rc.d
won't recreate all of them, but I haven't tried that.  But update-rc.d
*will* respect your changes to ordering or S/K.  If it doesn't, that's a
bug.

Apart from being almost impossible to work out whether the symlinks have
been removed or were never added, it is more correct to change Snn to Knn
because that says "I do not want that service to be running in this
runlevel".  No symlink says "Buggered if I know what I want done in this
runlevel".

> The problem is that when I apt-get upgrade it restores the default
> runlevels and starts the daemons.  How can I get the runlevels to stay
> at my settings across an apt-get upgrade ?

This:

> On my desktop I use update-rc.d to delete all the default symlinks

Is not the same as this:

> I have tried update-rc.d blah stop 0 1 2 3 4 5 6 . but when I apt-get

"update-rc.d -f remove blah" will delete the symlinks, "update-rc.d blah stop
10 $(seq 0 6)" will create symlinks /etc/rc[0-6]/K10blah to
/etc/init.d/blah (if no symlinks already exist).

Since it's nigh-on impossible to work out whether a complete lack of
symlinks is due to "admin removed them" or "they were never installed", if
update-rc.d doesn't find any symlinks, it will install a set according to
the rules provided (update-rc.d blah defaults is the most common).

The problem, of course, is that the second paragraph of the "INSTALLING INIT
SCRIPT LINKS" section of man update-rc.d will bite you in the arse if you
try to use update-rc.d to do your own bit of rearrangement.  Doing a "-f
remove" followed by a "blah stop" should work, though.

- Matt

Attachment: signature.asc
Description: Digital signature

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to