FS#32158 - [cronie] crond.service symlink enable/disable does not work

Attached to Project: Arch Linux
Opened by Yaff Are (yaffare) - Monday, 22 October 2012, 15:18 GMT
Last edited by Gaetan Bisson (vesath) - Monday, 19 November 2012, 00:58 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Gaetan Bisson (vesath)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version 4.0.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
The symlink from crond.service to cronie.service does not work as expected.
You can start/stop, but you cannot enable/disable.

Steps to Reproduce:

[root@mypc ~]# systemctl disable crond.service
Failed to issue method call: No such file or directory
This task depends upon

Closed by  Gaetan Bisson (vesath)
Monday, 19 November 2012, 00:58 GMT
Reason for closing:  Fixed
Additional comments about closing:  cronie-1.4.8-4 in [testing]
Comment by Daniel Wallace (gtmanfred) - Monday, 22 October 2012, 15:24 GMT
correct, use cronie.service or dcron.service, the symlink is purely for start, and possibly for initscripts compatibility
Comment by Gaetan Bisson (vesath) - Tuesday, 23 October 2012, 00:04 GMT
Since Tom added that symlink I'm sure he'll be delighted to tell us why. :)
Comment by Tom Gundersen (tomegun) - Wednesday, 24 October 2012, 14:02 GMT
I need to sort this out in systemd, or just drop all the symlinks I guess.

The reason for adding this was to avoid errors when arch-daemons.target is enabled, and people had DAEMONS=('crond' ...) in rc.conf.

With the symlink in place, this would then start cronie.service, rather than be a wrapper around the legacy /etc/rc.d/crond. Without the symlink this would in particular be problematic in case someone has enabled cronie.service, but still kept crond in DAEMONS (as both would be started).

It is correct that crond.service can not be enabled, but the "proper" service (cronie.service) must be used instead. On the one hand this is confusing as there is no indication which one should be used (unless you check which is a symlink and which is a real file), on the other hand it is good that people will not be able to start using crond.service, so that we will be able to drop it at some point.

I suppose the simplest fix would be to not show crond.service in "systemctl list-unit-files" (and then it will not appear in the bash completion for "systemctl enable cron<TAB>" either.

Alternatively, we could rip out all the symlinks, but I was hoping to do that once initscripts was thoroughly dead and buried and everyone had transitioned over successfully (as I still think it reduces problems).
Comment by Dave Reisner (falconindy) - Wednesday, 24 October 2012, 14:08 GMT
Please. Rip out all the symlinks. If you want to keep this behavior, implement it as a list of "quirks" in initscripts (contained within the generator itself).
Comment by Gaetan Bisson (vesath) - Monday, 19 November 2012, 00:58 GMT
I'm removing the symlinks; complain while this remains in [testing] if you must.

Loading...