in bash "something || other" means that if "something" is FALSE then do "other". In crontab "run-parts --report /etc/cron.daily" will only happen when
"test -x /usr/sbin/anacron" is false. /usr/sbin/anacron does exist.
Testing in the terminal
$ test -x /usr/sbin/anacron || echo "xxx"
gave no echo. changing || to && gave the echo.
Meaning that since /usr/sbin/anacron exists the cron.daily will never happen!
So deleted the "test -x /usr/sbin/anacron ||" part in crontab,like
55 1 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
55 1 * * * root cd / && run-parts --report /etc/cron.daily
Plus the test for /usr/bin/anacron ensures that cron runs the daily, weekly and monthly script only if anacron is not installed. Take a look at the file /etc/anacrontab. It is also configured to run the daily, weekly, and monthly scripts.If your anacron works well, no need to do the above change. Also grep -i 'anacron' /var/log/syslog will show you some useful info.
Last edited by yzhong; 01-15-2009 at 08:15 PM.