Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 503634

Summary: sys-process/cronie : /etc/cron.hourly/0anacron not executed
Product: Gentoo Linux Reporter: Frédéric COIFFIER <fcoiffie>
Component: [OLD] Core systemAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED WORKSFORME    
Severity: normal CC: bugs+gentoo, cron-bugs+disabled
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Frédéric COIFFIER 2014-03-06 15:37:08 UTC
After installing sys-process/cronie with anacron USE flag, anacron was never launched.

I understand that anacron is launched by cron thanks to /etc/cron.hourly/0anacron.
And this script isn't executable.
After doing chmod +x /etc/cron.hourly/0anacron, anacron is correctly executed.

Reproducible: Always

Steps to Reproduce:
1. Install sys-process/cronie
2. Wait for the execution of /etc/cron.{daily, weekly, monthly} scripts

Actual Results:  
Anacron is never executed and /etc/cron.{daily, weekly, monthly} scripts are never launched

Expected Results:  
Anacron should work at the installation
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-06 15:55:11 UTC
(In reply to Frédéric COIFFIER from comment #0)
> After installing sys-process/cronie with anacron USE flag, anacron was never
> launched.
> 
> I understand that anacron is launched by cron thanks to
> /etc/cron.hourly/0anacron.
> And this script isn't executable.
> After doing chmod +x /etc/cron.hourly/0anacron, anacron is correctly
> executed.

That's exactly how it ought to work. It doesn't get executed unless you want it to.
Comment 2 Frédéric COIFFIER 2014-03-06 21:13:59 UTC
But in this case, is it possible to add a message in postinst ?
I searched for days before finding the solution. And there is no documentation about this behaviour.
Comment 3 Philipp Riegger 2014-04-17 09:43:06 UTC
In case it should only be run if the user explicitly sets it to be executable, maybe the test in /etc/crontab which is at the moment

[ ! -f /etc/cron.hourly/0anacron ]

should be set to

[ ! -x /etc/cron.hourly/0anacron ]