On Tue, Oct 02, 2001 at 06:03:27PM +0200, Bruno BEAUFILS wrote: > > I noticed a strange things in my /etc/crontab which seems to be installed by > the cron and maybe modified by the anacron package. > > Here is my crontab : > > ----------------------------------------crontab---------- > # /etc/crontab: system-wide crontab > # Unlike any other crontab you don't have to run the `crontab' > # command to install the new version when you edit this file. > # This file also has a username field, that none of the other crontabs do. > > SHELL=/bin/sh > PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin > > # m h dom mon dow user command > 25 2 * * * root test -e /usr/sbin/anacron || run-parts --report > /etc/cron.daily > 47 2 * * 7 root test -e /usr/sbin/anacron || run-parts --report > /etc/cron.weekly > 52 2 1 * * root test -e /usr/sbin/anacron || run-parts --report > /etc/cron.monthly > # > ----------------------------------------crontab---------- > > What I think is a problem is the `||' if the file /usr/sbin/crontab exist the > run-parts part will not be executed, and if it does not exist the run-parts > can not be executed. > > I dont understand why the `||' are not replaced by `&&'.
It's /usr/sbin/anacron. If anacron (the at package) exists, it let's anacron handle the execution of those parts. If it doesn't exist, (the logical "or" ||), then it executes run-parts directly, since anacron isn't installed to do it itself. It's correct. -- .----------=======-=-======-=========-----------=====------------=-=-----. / Ben Collins -- Debian GNU/Linux \ ` [EMAIL PROTECTED] -- [EMAIL PROTECTED] -- [EMAIL PROTECTED] ' `---=========------=======-------------=-=-----=-===-======-------=--=---'