FS#48236 - [atop] cron.d configuration invalid

Attached to Project: Community Packages
Opened by ... (spider007) - Thursday, 18 February 2016, 11:54 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 10 March 2016, 18:20 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

atop ships with a file in /etc/cron.d/atop; it contains:

# daily restart of atop at midnight
0 0 * * * systemctl restart atop

This is obviously incorrect; it should be:

# daily restart of atop at midnight
0 0 * * * root systemctl restart atop
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 10 March 2016, 18:20 GMT
Reason for closing:  Fixed
Comment by ... (spider007) - Thursday, 18 February 2016, 11:55 GMT
However, this might even be easier to implement using a systemd-timer
Comment by Doug Newgard (Scimmia) - Thursday, 18 February 2016, 14:11 GMT
Doesn't seem to be obviously incorrect to me.

The timer question was brought up in another ticket.
Comment by ... (spider007) - Thursday, 18 February 2016, 18:05 GMT
Like I said, it's missing the username. Here's a quote from `man crontab`:

Jobs in /etc/cron.d/
The jobs in cron.d and /etc/crontab are system jobs, which are used
usually for more than one user, thus, additionally the username is
needed. MAILTO on the first line is optional.
Comment by Doug Newgard (Scimmia) - Thursday, 18 February 2016, 18:14 GMT
Your implementation may say that, but it's not POSIX.
Comment by ... (spider007) - Thursday, 18 February 2016, 18:15 GMT
Ah, that's an interesting point. However, if I install 'cron' on Arch, I get cronie. Cronie does require a username in that file

Loading...