🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83113

Re: Cron failing on Squeeze

#83113
From: John F. Morse
Date: Tue, 08 Jun 2010 00:04
120 lines
5514 bytes
Hi Julien

>> 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 (?)


Not yet. ;-)

john@n102:/usr/bin$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages will be upgraded:
  libgssapi-krb5-2 libgssrpc4 libk5crypto3 libkadm5clnt-mit7 
libkadm5srv-mit7 libkdb5-4 libkrb5-3 libkrb5support0 liblzma2 ntp
  xz-utils
11 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,665kB of archives.
After this operation, 4,096B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.


It appears from reading Bug 581612 in ~67 submittals, that the fault is 
being placed on all the "buggy" applications/packages, and not cron.

If that is indeed the truth, then I guess you need to provide a patch 
for INN2. ;-)

As I replied to Richard Kettlewell, for a test I have created a symlink 
from /usr/bin/rnews -> /usr/lib/news/bin/rnews and I will see if that 
will provide a temporary fix.

The other possible fix might be something like the following:


--- /etc/cron.d/inn2.old    2010-06-07 18:46:30.000000000 -0500
+++ /etc/cron.d/inn2.new    2010-06-07 18:46:08.000000000 -0500
@@ -1,13 +1,13 @@
 SHELL=/bin/sh
-PATH=/usr/lib/news/bin:/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/lib/news/bin
 
 # Refresh the cached IP addresses every day.
 
-2 3     * * *   news    [ -x /usr/sbin/ctlinnd ] && ctlinnd -t 300 -s 
reload incoming.conf "flush cache"
+2 3     * * *   news    [ -x /usr/lib/news/bin/ctlinnd ] && ctlinnd -t 
300 -s reload incoming.conf "flush cache"
 
 # Every hour, run an rnews -U. This is not only for UUCP sites, but
 # also to process queud up articles put there by in.nnrpd in case
 # innd wasn't accepting any articles.
 
-10 *    * * *   news    [ -x /usr/bin/rnews ] && rnews -U
+10 *    * * *   news    [ -x /usr/lib/news/bin/rnews ] && rnews -U


What do you think?


-- 
John

When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Technical Details
Message-ID: <huk1ej$pt3$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.ams.giganews.com!nntp.giganews.com!feeder.erje.net!news2.arglkargh.de!news.litech.org!news.glorb.com!optima2.xanadu-bbs.net!n102.xanadu-bbs.net!.POSTED!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> <hujsco$4b9$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <huk1ej$pt3$1@n102.xanadu-bbs.net>
Subject: Re: Cron failing on Squeeze
Date: Mon, 07 Jun 2010 19:04:35 -0500
From: "John F. Morse" <john@example.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> <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.ams.giganews.com!nntp.giganews.com!feeder.erje.net!news2.arglkargh.de!news.litech.org!news.glorb.com!optima2.xanadu-bbs.net!n102.xanadu-bbs.net!.POSTED!not-for-mail
Newsgroups: news.software.nntp
Organization: Xanadu BBS
Lines: 120
Reply-To: dont.bother
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: n102.xanadu-bbs.net 1275955475 26531 192.168.89.210 (8 Jun 2010
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Tue, 8 Jun 2010 00:04:35 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.24 (X11/20100317)
In-Reply-To: <hujsco$4b9$1@news.trigofacile.com>
X-Enigmail-Version: 0.96.0