Hello Bruno, On Tuesday, October 02, 2001 at 6:03:27 PM, you wrote (at least in part):
> 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 `&&'. > Do I miss something, or is it a bug ? This lines look for _ANACRON_ and if it is installed in the correct location 'anacron' executes the scripts by itself. If anacron is not installed (or not executable) run-parts from package 'debianutils' is executed instead. >From 'man run-parts' SYNOPSIS run-parts [--test] [--verbose] [--report] [--umask=umask] [--help] [--version] directory DESCRIPTION run-parts runs a number of scripts or programs found in a single directory directory. So run-parts would take care about executing the cron-ed jobs. So the idea behind this is not to make run-parts execute the cron-jobs but use it as 'fall back' solution if anacron ain't available and therefore the '||' is correct. -- Best regards Peter