On Fri, Feb 24, 2017 at 03:07:36PM +0100, Giovanni Bechis wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 02/23/17 17:44, Andreas Kusalananda Kähäri wrote: > > Hi, > > > > I was once the port maintainer of sysutils/anacron. I wrote the > > pkg/README file and it's been bothering me ever since. > > > > I have attached a patch that fixes it in such a way that > > > > * Environtment variables are the same as in the default crontab for > > root. > > > /usr/local/{s,}bin is not in crontab(5) default path
Exactly, that's why the patch removes these paths. > > > * Absolute paths for /bin/sh are being used. > > > > * No pipe to tee (why did I even have that?). > > > > * Suggest adding an @hourly job to run anacron in root's crontab. > > > why is this needed ? If the cron jobs are commented out of the crontab of root and instead handled by anacron, anacron will have to be invoked at least daily. Invoking it hourly is a good solution for a system that is running during irregular hours. This will ensure that anacron is run at least once every day, even if the machine stays up >24h (in which case a @reboot job is not enough) or if the machine isn't running at midnight (in whuch case a @daily job wouldn't be run). There is no resource drain in doing this as anacron will just skip all jobs that won't be needing running. > > > * Fixes @hourly and @reboot crontab suggestions so that it tests if the > > executable is present. Is this a good idea? Maybe it's better to let > > it fail, so that it's spotted? > > > I think it is better to let it fail. Then remove the "test -x ... &&" > > > Also: > > > > * Bump revision in Makefile. > > > > > > With kind regards, > > Kusalananda > > > Cheers > Giovanni
signature.asc
Description: PGP signature