Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 466900 - sys-process/fcron - /etc/crontab contradicts system-crontab USE flag
Summary: sys-process/fcron - /etc/crontab contradicts system-crontab USE flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Thomas Deutschmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-23 13:23 UTC by Olipro
Modified: 2016-11-17 22:08 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olipro 2013-04-23 13:23:48 UTC
According to /etc/crontab, in order for cron.daily, cron.weekly etc to work, you must run "crontab /etc/crontab" as root.

Conversely, the system-crontab USE flag claims that the above will work regardless and only /etc/cron.d and /etc/crontab require special attention
Comment 1 Christian Burger 2014-10-13 09:04:56 UTC
This one confused me, too. Together with #467316 the documentation is pretty misleading for a first time user of fcron.

I was using fcron for a long time before I figured that it is best for me to either activate 'system-crontab' or run

/usr/libexec/check_system_crontabs -f -i

once -- basically they have the same effect. And from that point on 

* /etc/crontab
* /etc/cron.d/ and
* /etc/cron.{hourly,daily,weekly,monthly}

work just fine. You can do "crontab /etc/crontab", but then only

* /etc/cron.{hourly,daily,weekly,monthly}

will work.

I think both bugs (this one and #467316) reference the same problem: Inaccurate/misleading documentation. I think "/etc/crontab" should be reworked with a preface like this, because it might be one of the first texts someone familiar with other cron daemons reads when configuring fcron:

# fcron:
# It is *not* a built-in feature of fcron to execute cronjobs configured in
# /etc/crontab,
# /etc/cron.d or
# /etc/cron.{hourly|daily|weekly|montly}
# The contents of /etc/crontab and such have to be run by an explicitly 
# configured cronjob. 
#
# You can add the contents of /etc/crontab once to the crontab of root by 
# running
# "crontab -u root /etc/crontab"
# or the system's crontab by running
# "crontab -u systab /etc/crontab"
# "/etc/crontab" in its unmodified state enables the use of
# "/etc/cron.{hourly|daily|weekly|montly}". Any changes to "/etc/crontab" 
# afterwards will not be noticed by fcron.
#
# Ideally, run this once as:
# "# /usr/libexec/check_system_crontabs -f -i"
# This enables the use of 
# /etc/crontab,
# /etc/cron.d and
# /etc/cron.{hourly|daily|weekly|montly}
# This way all locations are checked regularly (every 10 minutes). You should 
# not directly modifiy "systab" afterwards. Instead change "/etc/crontab" which
# changes gets included into the "systab" every 10 minutes.
Comment 2 Christian Burger 2014-10-13 09:10:26 UTC
Sorry, accidentally pressed "submit" while editing the last paragraph:

# Ideally, run this once as root:
# "/usr/libexec/check_system_crontabs -f -i"
# This enables the use of 
# /etc/crontab,
# /etc/cron.d and
# /etc/cron.{hourly|daily|weekly|montly}
# This way all locations are checked regularly (every 10 minutes). You should 
# not directly modifiy "systab" afterwards. Instead change "/etc/crontab" which
# changes gets included into the "systab" every 10 minutes.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2016-11-17 22:08:02 UTC
Thanks for the report. This is now fixed:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=531e27c45e1f413da44d8a51ece0f59e454586fb