🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83112

Re: Cron failing on Squeeze

#83112
From: Julien ÉLIE
Date: Mon, 07 Jun 2010 22:38
62 lines
3762 bytes
Hi John,

> I do see where the failing cron jobs both have "[ -x ... ]" in them. The midnight 
> expiry job, and the NINPATHS jobs do not. They do work.
>
> Both of the failing jobs have incorrect pathnames (/usr/sbin/ctlinnd and 
> /usr/bin/rnews).

Interesting.
May it be linked to <http://bugs.debian.org/581612>?

I read there:

%%
Subject: Re: Bug#581612: cron sends e-mails when a job exits nonzero
         (after upgrade to 3.0pl1-110)

> If it is desired behavior that cron now sends out email if the job exit's with 
> status 1, it is strange that I now get a lot of mail from system cron jobs....

Those packages should be considered buggy with the new cron.

> and a private cron job:
> */5 * * * *    killall nspluginviewer > /dev/null 2>&1
> I thought that 2>&1 would send the ERROUT to the same place as STDOUT... Why do 
> cron catch these then?

That does redirect both std{out,err} to /dev/null.  However, killall
exists nonzero when it doesn't kill anything.  Cron (the new version)
tries harder to make failures more obvious.  If you want to run that
command silently, change it to:
 killall nspluginviewer >/dev/null 2>&1 || true
or (slightly more assertive):
 killall nspluginviewer >/dev/null 2>&1 || [ $? -eq 1 ]

> /etc/cron.d/php4:
> 09,39 *     * * *     root   [ -d /var/lib/php4 ] && find /var/lib/php4/ -type 
> f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm

That could be rewritten as:
 d=/var/lib/php4; [ ! -d "$d" ] && exit; find $d -type f ... -print0 |xargs -r0 rm

Then, when php4 is in dpkg state "rc" (removed but not purged/config
files), the test succeeds, and the shell exists.  Right now, the test
fails, and the shell exists nonzero, and (new) cron warns you, even if
though command doesn't itself write any output.
%%


Oh, that'a a huge change in Squeeze!
I do not know whether it will actually be shipped with Squeeze...
(This /feature/ is marked as "Pending Upload bugs"; it will probably
be removed soon.)

Anyway, maybe Marco will want to update the crontab shipped with inn2
to cope with that (?)

-- 
Julien ÉLIE

« L'ordinateur obéit à vos ordres, pas à vos intentions. » 
Technical Details
Message-ID: <hujsco$4b9$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder2.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!.POSTED.aaubervilliers-151-1-33-134.w83-112.abo.wanadoo.fr!not-for-mail
References: <hug8eq$o17$1@n102.xanadu-bbs.net> <hugbmu$691$1@news.trigofacile.com> <huh77g$rau$1@snarked.org> <huhmsv$4vu$1@n102.xanadu-bbs.net>

Show Full Headers
Complete Article Headers
Message-ID: <hujsco$4b9$1@news.trigofacile.com>
Subject: Re: Cron failing on Squeeze
Date: Tue, 8 Jun 2010 00:38:14 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <hug8eq$o17$1@n102.xanadu-bbs.net> <hugbmu$691$1@news.trigofacile.com> <huh77g$rau$1@snarked.org> <huhmsv$4vu$1@n102.xanadu-bbs.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder2.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!.POSTED.aaubervilliers-151-1-33-134.w83-112.abo.wanadoo.fr!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 62
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
 reply-type=response
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 7 Jun 2010 22:38:16 +0000 (UTC)
Injection-Info: news.trigofacile.com;
 posting-host="aaubervilliers-151-1-33-134.w83-112.abo.wanadoo.fr:83.112.144.134";
 logging-data="4457"; mail-complaints-to="abuse@trigofacile.com"
In-Reply-To: <huhmsv$4vu$1@n102.xanadu-bbs.net>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6002.18197
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18197
X-Original-Bytes: 3572