FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-29-2011, 05:27 AM
Nicolas Kovacs
 
Default Ubuntu Server 10.04: enable/disable services on startup

Hi,

Short question: what's the "Ubuntu way" of enabling/disabling services
on startup? Speaking of this, what are the different runlevels
corresponding to? So far, I'm accustomed to working regularly on RHEL
and Slackware.


RHEL: runlevel 3 (commandline/multiuser) vs. 5 (graphical/multiuser)

# chkconfig --level 345 <service> on|off

Slackware: runlevel 3 (commandline/multiuser) vs. 4 (graphical/multiuser)

# chmod 0755 /etc/rc.d/rc.<service> --> activate
# chmod 0644 /etc/rc.d/rc.<service> --> deactivate

How are things supposed to work in Ubuntu?

cheers,

Niki
--
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web : http://www.microlinux.fr
Mail : info@microlinux.fr
Tél. : 04 66 63 10 32

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-29-2011, 06:28 AM
Nicolas Kovacs
 
Default Ubuntu Server 10.04: enable/disable services on startup

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 .

Disable BIND on startup:

# update-rc.d -f bind9 remove

Re-enable BIND on startup:

# update-rc.d bind9 start 20 2 3 4 5 . stop 20 0 1 6 .

As for finding the default start and kill values, I did this:

# ls /etc/rc?.d

I took a look at the symlinks on a default install of DHCP and Bind, and
then wrote down the respective values.


I must say this seems an unnecessarily complex way of doing things. But
then, probably I'm spoilt with Slackware's bone-headed BSD init )


Cheers,

Niki
--
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web : http://www.microlinux.fr
Mail : info@microlinux.fr
Tél. : 04 66 63 10 32

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-29-2011, 09:58 AM
"franz.reitinger"
 
Default Ubuntu Server 10.04: enable/disable services on startup

rcconf is your friend offering a semi-graphic UI to enable/disable
daemons


apt-get install rcconf
/franzR


On Thu, 29 Sep 2011 07:27:37 +0200, Nicolas Kovacs wrote:

Hi,

Short question: what's the "Ubuntu way" of enabling/disabling
services on startup? Speaking of this, what are the different
runlevels corresponding to? So far, I'm accustomed to working
regularly on RHEL and Slackware.

RHEL: runlevel 3 (commandline/multiuser) vs. 5 (graphical/multiuser)

# chkconfig --level 345 <service> on|off

Slackware: runlevel 3 (commandline/multiuser) vs. 4
(graphical/multiuser)


# chmod 0755 /etc/rc.d/rc.<service> --> activate
# chmod 0644 /etc/rc.d/rc.<service> --> deactivate

How are things supposed to work in Ubuntu?

cheers,

Niki
--
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web : http://www.microlinux.fr
Mail : info@microlinux.fr
Tél. : 04 66 63 10 32


/*
************************************************** **********

* Mail checked by Avira virus scanner (mail.htl-wels.at).
************************************************** **********
*/



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-29-2011, 10:51 AM
Colin Watson
 
Default Ubuntu Server 10.04: enable/disable services on startup

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@ubuntu.com]

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-29-2011, 10:04 PM
Avi Greenbury
 
Default Ubuntu Server 10.04: enable/disable services on startup

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.

Nope, that, too, is a symptom The problem is that it keeps changing.
Depending on which version you're running, I believe there are four
'Ubuntu' ways to configure what happens on boot.

There is, somewhere, a cheatseet of each of them, detailing which
versions are to be done in which way, but I can't find it at the
minute. It really should be a page on at least one of the official
Ubuntu documentation places.

--
Avi

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org