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

Re: handling runlevels independently with update-rc.d



On 2004-06-01, Sebastian Kügler penned:
> Hi,
>
> I am in the course of writing a graphical runlevel editor, and I happen to
> have the following questions:
>
> 1) What would you recommend to create the symlinks in the various runlevels,
> what is the preferred way of manipulating the runlevel stuff?
> a)ln -s
> b)update-rc.d
>
> My first thought was to use the latter, but I encountered a problem, which
> lead to my next question. 
>
> 2) If I remove all symlinks in all runlevels (basically "update-rc.d -f
> proftpd remove"), create a startup link ("update-rc.d proftpd start 50
> 4 ."), creating a stop link fails with the following output:
>
> # update-rc.d proftpd stop 50 4 .
> System startup links for /etc/init.d/proftpd already exist.
>
> This seems a bit odd to me, I checked twice, the startup link command did
> not create any Knnproftpd links. So why's that?

Well, you might start by reading the fine manual page:

[quote]
If  any  files  /etc/rcrunlevel.d/[SK]??name already exist then update-
rc.d does nothing.  This is so that the system administrator can  rear-
range  the links, provided that they leave at least one link remaining,
without having their configuration overwritten.
[/quote]

update-rc.d is used extensively in debian package configuration, where
it's important not to clobber the sysadmin's choices every time the
package is upgraded.

It's probably easier to use `ln -s` than to get update-rc.d working as
you would like.

-- 
monique



Reply to: