Bug 755227 - systemd needs something like a "completely-disable" command.
Summary: systemd needs something like a "completely-disable" command.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-19 19:31 UTC by Tom Horsley
Modified: 2011-11-21 13:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-19 22:46:38 UTC
Type: ---


Attachments (Terms of Use)

Description Tom Horsley 2011-11-19 19:31:15 UTC
Description of problem:

You can disable a service you don't want (or need) to run, but it can wind
up pointlessly running anyway. Specific example: pcscd.

http://ludovicrousseau.blogspot.com/2011/11/pcscd-auto-start-using-systemd.html

describes how pcscd is helpfully started automagically anytime anyone
so much as thinks they might be able to access a smart card reader. The fact
that there is no smart card reader on the system doesn't phase it, the daemon
starts anyway, and uses memory and resources (probably no much of either,
but multiply this by thousands of other helpful services and you might start
to notice).

It would be nice if there was a sanctioned and approved official way to
completely and utterly disable a service short of removing it completely
from the system.

(Maybe /etc/systemd/system/totally.disabled/*.service symlinks?)

Version-Release number of selected component (if applicable):
systemd-37-3.fc16.x86_64


How reproducible:
every time I booted my system, there was pcscd running.

Steps to Reproduce:
1.see above
2.
3.
  
Actual results:
Disabled service running anyway

Expected results:
Some way to say "No, really, I meant DISABLE!"

Additional info:

Comment 1 Kay Sievers 2011-11-19 19:46:08 UTC
You don't want it to auto-start? Then disable the socket if that's possible,
not sure if the enablement is in /lib or /etc.

In any case you can 'mask' a service with systemctl. That's the hard switch-off,
nothing, not even manually, the service can be started anymore.

Comment 2 Tom Horsley 2011-11-19 22:46:38 UTC
Yes. Mask sounds like exactly what I want, I just didn't spot it
in the man page (I can't say that "mask" seems like any kind of name
I'd expect for this command :-).

Comment 3 Kay Sievers 2011-11-20 02:07:47 UTC
Yeah, it's just a verb for making it kind of completely disappear, while it
is still installed. :)

Comment 4 Michal Schmidt 2011-11-21 12:25:01 UTC
Tom,
are you saying that "systemctl disable pcscd.service" is not enough to disable the service for the next boot? That would be strange, because in this case the command should disable both units (*.service and *.socket) as the [Install] section uses "Also=...".

$ sudo systemctl disable pcscd.service
rm '/etc/systemd/system/sockets.target.wants/pcscd.socket'
rm '/etc/systemd/system/multi-user.target.wants/pcscd.service'

Comment 5 Tom Horsley 2011-11-21 12:48:36 UTC
Oh, it is disabled at boot time, it is just that something (kdm maybe?) says
to itself, "Oh, I better check and see if there is a smart card reader to
talk to", and that causes the service to start even though it is disabled.
(See the link in comment #1).

Comment 6 Michal Schmidt 2011-11-21 12:53:08 UTC
As long as pcscd.socket is disabled too (and it is expected to be, see comment #4), then kdm's check should NOT result in start of the service.

Comment 7 Tom Horsley 2011-11-21 13:51:07 UTC
Kdm was just a guess. I have no idea what was making it start, all I know
for sure was that I disabled it, yet I would still find it running after
the system was booted.

Maybe what systemd really needs is the command: "Explain to me please exactly
why this thing is running".

Anyway, a "yum -C erase pcsc-lite" made it stop running for good :-).


Note You need to log in before you can comment on or make changes to this bug.