Ubuntu Server 10.04: enable/disable services on startup
Colin Watson
cjwatson at ubuntu.com
Thu Sep 29 10:51:38 UTC 2011
On Thu, Sep 29, 2011 at 08:28:29AM +0200, Nicolas Kovacs wrote:
> Le 29/09/2011 07:27, Nicolas Kovacs a écrit :
> >How are things supposed to work in Ubuntu?
>
> OK, I googled some more, and I'll try to answer this myself. The
> problem here is not so much the lack of information, but the wealth
> of contradicting - and obviously wrong - information. Anyway, I
> *think* it goes like this. Two examples :
>
> Disable DHCP server on startup:
>
> # update-rc.d -f dhcp3-server remove
>
> Re-enable DHCP server on startup:
>
> # update-rc.d dhcp3-server start 40 2 3 4 5 . stop 40 1 .
This won't survive upgrades properly, so I wouldn't recommend that
approach. As of Ubuntu 9.10, you should use this pattern instead:
# update-rc.d dhcp3-server disable
# update-rc.d dhcp3-server enable
For Upstart jobs, as of Ubuntu 11.04, it's simplest to do:
# echo manual >/etc/init/name-of-job.override
Before Ubuntu 11.04, the best recourse was to comment out the 'start on'
line in /etc/init/name-of-job.conf, but this was really rather confusing
and error-prone so we improved it.
--
Colin Watson [cjwatson at ubuntu.com]
More information about the ubuntu-users
mailing list