[systemd-devel] How can i disable bluetooth.service in fc15

Lennart Poettering lennart at poettering.net
Sat Feb 26 08:23:19 PST 2011


On Fri, 25.02.11 20:05, Miklos Vajna (vmiklos at frugalware.org) wrote:

> On Thu, Feb 24, 2011 at 11:39:49PM +0100, Rave it <chat-to-me at raveit.de> wrote:
> > i want to disable bluetooth.service in fedora 15 because i don't needed.
> > Normaly i removed bluez but now a days bluez have gnome-shell as an
> > dependency.
> > I try to do this with:
> > [root at mother rave]# systemctl stop bluetooth.service
> > [root at mother rave]# systemctl disable bluetooth.service
> > 
> > But this helps only for a moment, after a restart bluetooth.service
> > starts again.
> > I think disabling bluetooth.service is possible because:
> > [root at mother rave]# systemctl show -p "Wants" bluetooth.service
> > Wants=
> > 
> > So what i can do to solve this prob? Or isn't it possible?
> 
> It starts because of bus activation.
> 
> A hack I can imagine is copying /lib/systemd/system/bluetooth.service to
> /etc/systemd/system/bluetooth.service and change /usr/sbin/bluetoothd -n
> to /bin/true.

It's much nicer to "mask" things. In systemd if a service file is linked
to /dev/null systemd will notice that and show it as "masked" and refuse
any kind of activation. It's a bit of a hidden feature, since the normal
way of disabling things should be good enough and we don't want to
confuse users unnecessarily, but for everything else there is this
hardcore way of disabling called masking.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list