Hide Forgot
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:
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.
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 :-).
Yeah, it's just a verb for making it kind of completely disappear, while it is still installed. :)
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'
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).
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.
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 :-).