[clug] Starting services in ubuntu

David Gibson david at gibson.dropbear.id.au
Wed May 11 01:51:10 GMT 2005

On Wed, May 11, 2005 at 11:35:19AM +1000, paul at pabryan.mine.nu wrote:
> On Wed, May 11, 2005 at 10:08:54AM +1000, David Gibson wrote:
> > 
> > And like Debian, from which it is derived, it has the update-rc.d
> > command which theoretically does something similar to chkconfig.
> > However, it's really designed for use from package scripts, not by the
> > user, and I, for one, have never figured out how to drive it usefully.
> It's pretty straight forward. The man page will tell you all about
> it. 
> To create the default setup, do a:
> $ update-rc.d apache2 defaults 
> Where update-rc.d differs from chkconfig however is due to it being,
> as you say, for package scripts. If links already exist, it won't
> overwrite them. So, it's really only for creating the links
> initially. This is a Debian policy thing. The assumption is that, if
> the links exist, the sys admin did it and the package scripts should
> respect that.

Right, which means it can't do the handy things chkconfig does, of
changing which runlevels a service is active in.

> If you want to change the links, you need to remove them first. Issue a:
> $ update-rc.d -f apache2 remove
> The -f is needed if /etc/init.d/apache2 stills exists, which I assume
> it does otherwise we wouldn't be having this conversation.
> Then you can do as the above. Remember, this is only if you want to
> change the existing set of links. If all you want to do is create them
> initially, you don't need to do the remove.

David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!

More information about the linux mailing list