Skip to content

Systemd - when systemctl unmask command fails

When you are using a typical modern Linux, where systemd is the init system, then you should be able to enable/disable daemons with:

systemctl enable somename.service
systemctl disable somename.service
and mask/unmask them with:
systemctl mask somename.service
systemctl unmask somename.service
In real life you may end up with the simple fact that unmask command does not do anything (my last case was with SANE daemon - used for running scanners in Linux):

systemctl unmask saned
systemctl status saned
● saned.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)

Well, in this case, check how things are:

file /lib/systemd/system/saned.service
/lib/systemd/system/saned.service: symbolic link to /dev/null
or

cd /lib/systemd/system/
ls -l sane*
lrwxrwxrwx 1 root root 9 mai 21 11:04 saned.service -> /dev/null
-rw-r--r-- 1 root root 309 mai 21 11:04 saned@.service
-rw-r--r-- 1 root root 132 mai 21 11:04 saned.socket
Which means that SANE unit file saned.service is symlinked to /dev/null and won't do anything, but there is a renamed unitfile saned@.service.

So the fix is simple - delete the symlinked one, rename the right one, enable and start the daemon:

cd /lib/systemd/system/
rm saned.service
mv saned@.service saned.service
systemctl enable saned.service
systemctl start saned.service

Eesti ID-kaardi tarkvara ehk open-eid v. 17.10 kasutamine Debianis

Nädal tagasi ilmus uus ID-kaardi tarkvara versiooninumbriga 17.10. Kui oled Debian stretch'i kasutaja, siis kõik mis on kirjas artiklis Eesti ID kaardi tarkvara ehk open-eid v. 3.12 kasutamine Debianis kehtib jätkuvalt, kuid sul võib vaja olla kahte täiendust:

Kui sul tekib uuendamise käigus veateateid, mis viitavad nimetatud teekidele, siis lisa need kas eraldi "dpkg -i xxx" stiilis, või pannes vastavad repod oma arvuti sources.list faili ning open-eid saab uuendatud versioonini 17.10. Tegemist on siis selle tarkvaraversiooniga, millega saad teha ka ID-kaardi sertifikaatide uuendused.