Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#33050 - systemd ignores commented out rc.conf DAEMON variable

Attached to Project: Arch Linux
Opened by Ernestas (ernetas) - Tuesday, 11 December 2012, 20:05 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 12 December 2012, 23:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Description: systemd ignores commented out rc.conf DAEMON variable

I had such lines in rc.conf:
#DAEMONS=(crond NetworkManager)

But the crond script still reported that rc.d is in use:
ernestas ~ $ sudo systemctl status crond
crond.service - LEGACY unit for "crond" rc script
Loaded: loaded (/etc/rc.conf)
Active: failed (Result: exit-code) since Tue, 2012-12-11 22:03:04 EET; 31s ago
Docs: man:arch-daemons(8)
Process: 13936 ExecStart=/etc/rc.d/crond start (code=exited, status=1/FAILURE)
Process: 13932 ExecStartPre=/usr/bin/echo WARNING: A legacy rc script is being used. Consider removing this from your DAEMONS array and enabling a native systemd service instead. (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/crond.service

Dec 11 22:03:04 pluto systemd[1]: Starting LEGACY unit for "crond" rc script...
Dec 11 22:03:04 pluto echo[13932]: WARNING: A legacy rc script is being use...d.
Dec 11 22:03:04 pluto crond[13936]: [106B blob data]
Dec 11 22:03:04 pluto systemd[1]: Failed to start LEGACY unit for "crond" r...t.
Dec 11 22:03:04 pluto systemd[1]: Unit crond.service entered failed state

Warning: Unit file changed on disk, 'systemctl --system daemon-reload' recommended.
ernestas ~ $ sudo systemctl start crond
This task depends upon

Closed by  Dave Reisner (falconindy)
Wednesday, 12 December 2012, 23:45 GMT
Reason for closing:  Not a bug
Comment by Dave Reisner (falconindy) - Tuesday, 11 December 2012, 20:21 GMT
I don't particularly believe that the full story is here. The generator that creates these units is a bash script and simply sources /etc/rc.conf for parsing. You're essentially reporting a severe bug in bash. I tend to think the problem here is actually that you commented out DAEMONS without rebooting, and we never delete any generated units, just write new ones.

The simple solution would just be to uninstall initscripts.
Comment by Ernestas (ernetas) - Wednesday, 12 December 2012, 21:59 GMT
I uninstalled initscripts, but that didn't change anything. But nevermind - I simply learned that cronie is launched with a different service file, while the crond.service is just a leftover not removed after initscripts and rc.conf cleanup.
P. S. I rebooted a few dozens of times after commenting out rc.conf DAEMONS as I was using a only systemd services for 3 months now.
Comment by Dave Reisner (falconindy) - Wednesday, 12 December 2012, 23:45 GMT
If you had a legacy unit in /etc/systemd/system, it's because you copied it there. The generator only ever wrote to /run.