[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] 1.9.33, posting trouble
On 10 Feb '03, 12:03am +0100, Matthias Andree wrote:
> Joshua Crawford schrieb am Sunday, den 09. February 2003:
>
> > I was having a little problem since I upgraded to 1.9.33, in that no
> > articles were posted when fetchnews was run from cron (user news). But they
> > were when I ran it manually.
> >
> > I finally traced it down to the new old-directory saving in
> > fetchnews.c:postarticles(), the return if savedir < 1 (line 1475). Running
> > from cron, as user news, the programme was unable to read /var/spool/cron
> > (root.root 751, slackware's default). I've 'fixed' it by changing to the
> > spool directory in the wrapper script, before running fetchnews.
> >
> > Is this directory saving necessary? If so, perhaps you should add an error
> > message for when that test fails.
>
> I added it as robustness feature, I didn't expect fetchnews to be
> started in a working directory it wasn't allowed to read.
>
> Could you show your cron line that fails, with fix?
Cron entry for user news:
8,18,28,38,48,58 * * * * /usr/local/bin/fetchnews-wrapper.sh
/usr/local/bin/fetchnews-wrapper.sh:
===
#!/bin/sh
if [ ! -e /var/lock/LCK..modem ]; then
exit 0
fi
# added this to compensate for new dir checking in 1.9.33
cd /var/spool/news
/usr/sbin/fetchnews
if [ -n "`ls /var/spool/news/failed.postings`" ]; then
(
echo "To: bruce"
echo "From: news"
echo "Subject: Failed posting"
echo -e "\n"
ls /var/spool/news/failed.postings /var/spool/news/out.going
) 2>&1 | /usr/lib/sendmail -t
fi
===
The modification is marked.
--
Joshua 'bruce' Crawford http://geocities.com/mortarn
Phone: +61 404 084662 ICQ: 71445285
Unsigned, 'cos it seems the list software breaks it.
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list