[SOLVED]disabeling services at boot

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Tex-Twil

[SOLVED]disabeling services at boot

Post by Tex-Twil »

Hello,
I would like to disable some services (e.g. samba) from starting at boot (Mint 10). In previous versions of Mint, I just searched the scripts in /etc/rc?.d directories and added/deleted the links either manually or using update-rc.d.

Now there is a new "service" but the man page is very poor :( and I can't see any smbd files in the rc directories. Where/how are the services managed now ? How can I for example disable smbd from stating at boot ?


thanks,
Tex
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: disabeling services at boot

Post by altair4 »

This is actually a very confusing process these days. Here's my best shot at explaining this.

Services / daemons are now controlled by two different process - the "old" System-V process and Upstart.

System-V scripts are located at /etc/init.d and to find the status of them you issue the following command:

Code: Select all

sudo service --status-all
A "+" means it's running, a "-" means it's not, and a "?" means it's not a system-v job. You will notice that smbd gets a "?"

Upstart jobs are "referenced" in /etc/init.d but they eventually find their way to scripts in /etc/init. To find the status of upstart jobs you run the following command:

Code: Select all

sudo initctl list
You will notice that smbd is listed.

update-rc.d, sysv-rc-conf and bum are tools for managing System-V style init scripts. They are not able to manage Upstart jobs.

The only way at the moment afaik to stop an upstart job is to edit the startup script. For smbd for example, edit /etc/init/smbd.conf and comment out the "start on" line :
description "SMB/CIFS File Server"
author "Steve Langasek <steve.langasek@ubuntu.com>"

#start on (local-filesystems and stopped rc)
stop on runlevel [!2345]

respawn

pre-start script
RUN_MODE="daemons"

[ -r /etc/default/samba ] && . /etc/default/samba

[ "$RUN_MODE" = inetd ] && { stop; exit 0; }

install -o root -g root -m 755 -d /var/run/samba
end script

exec smbd -F
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tex-Twil

Re: disabeling services at boot

Post by Tex-Twil »

ok thanks for the explanation.
Locked

Return to “Installation & Boot”