View Full Version : [SOLVED] Disabling services/deamons
July 21st, 2010, 07:34 PM
I see stuff like samba, nfs-kernel-server, cups and bluetooth are started. Not sure if you'd call it a service or deamon but tried to disable them by renaming the sym links in /etc/rc[number].d
I use nfs ocasionally and would like to start this service manually. Renaming seems to work but then I found out that portmap is still running. Could not find a portmap script in /etc/rc... so now I'm wondering if there is one place where these kinds of services are started and maybe there if there is a gui available for it like in Hardy?
Using ubuntu 9.10
July 21st, 2010, 08:38 PM
Have you tried rcconf?
July 21st, 2010, 08:58 PM
Thank you for your reply.
rcconf might be a bit outdated since it didn't seem to work. It created script in etc/rc[number].d but since it seems upstart is handling starting this deamon it doesn't do much
July 21st, 2010, 09:14 PM
You can stop some services with bum (BootUpManager) which you can install from the repos, but unfortunately not all. I have no idea about nfs, but you can certainly stop bluetooth that way, and you can even stop some things in System ->Preferences ->Startup Applications. I think rc-conf has now been deprecated for a lot of things, and though they may be listed, they can not be stopped or started using it any more.
You can also try the command
sudo service <name> stop using the name of the service you want to stop where I show <name>. As an example ssh can be stopped that way, so if you have ssh-server installed but only use it very occasionally, you can add the command server ssh stop to the /etc/.rc.local file and it will stop ssh at bootup, then when you want to use it, use command
sudo service ssh start
The same command may work for a great many different services, but I have not tried, so will leave it to you to experiment further.
July 21st, 2010, 09:27 PM
Hi greeny, thanks for your reply. I can stop the service with the service command but I would like the service to never start. So the /etc/rc[number].d symlinks work quite well for nfs, samba, bluetooth and saned but somehow portmap is not started this way (maybe I forgot to run update-rc.d will try again). Here is all the portmap I could find:
>sudo find /etc -name '*portmap*'
Now ran the update-rc.d and
sudo update-rc.d portmap disable will reboot and see what happens.
July 21st, 2010, 09:31 PM
There is a program called BUM in the repositories, does exactly what you want.
July 21st, 2010, 09:34 PM
Take a look at:
To disable portmap from being started at bootup, you could edit the /etc/init/portmap.conf file to something like:
# portmap - RPC port mapper
# Portmap is a server that converts RPC (Remote Procedure Call) program
# numbers into DARPA protocol port numbers. It must be running in order
# to make RPC calls.
description "RPC port mapper"
author "Steve Langasek <email@example.com>"
start on (start-portmap
and net-device-up IFACE=lo)
and start portmap with:
sudo initctl start portmap
sudo initctl emit start-portmap
P.S. Writing in uppercase means that you yell and it's considered rude. ;)
July 21st, 2010, 09:56 PM
Hi sisco, thanks for the info. It looks like some deamons/services are started/disabled by init scripts and some by upstart. The autostart scripts are installed by the deb file I assume.
Changed the portmap.conf, rebooted and portmap is not started.
sudo service portmap startWill start it.
Thank you for all your advice and solving this problem.
July 21st, 2010, 10:06 PM
As for the caps; it wasn't meant as shouting but it would need to stick out as it is work in progress without getting the thread unnecessarily long. Will change it once the solution is clear.
Oh, okay. :)
As for bum, I will install that too and see what it does.
update-rc.d and BUM are tools for managing System-V style init script, they are not compatible with Upstart jobs.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.