Article View: news.software.readers
Article #5140Re: trn 3.1 : compilation problems, and Pnews problem
From: Greg Earle
Date: Tue, 03 Aug 1993 09:08
Date: Tue, 03 Aug 1993 09:08
65 lines
3372 bytes
3372 bytes
In article <CAw9A1.2AH@dutiws.twi.tudelft.nl> graaff@dutiws.twi.tudelft.nl (Hans de Graaff) writes:
>In <236h1a$qt5@venus.haverford.edu> Erik Oliver <eoliver@ralph.cs.haverford.edu> wrote:
>>Relating to the problem at hand, the Pnews w/ trn 3.1 seems to be having
>>problems specifically it complains about too many arguments to test. I
>>ran Pnews inside sh -v to get the following:
>>
>>if $test ! -f $newsgroups -a -x $rnlib/getactive; then
> ^^
>I guess you also have a test that doesn't know how to check whether a
>file is executable. I changed both -x's to -r, which fixed the problem.
>
>[ Wayne: you should have got this through Cliff, since I found it with strn ]
Looking at the latest strn (which is based on trn 3.2), it looks like Wayne
succumbed to this "fix":
isolar:2:70 % sed -n '105,116p' Pnews.SH
if $test ! -f "$newsgroups" -a -r "$rnlib/getactive"; then
newsgroups="$tmp/Pnng.$$";
rmlist="$newsgroups";
cmdlist="$rnlib/getactive newsgroups $tmp/Pnng.$$ ; ";
fi
if $test ! -f "$active" -a -r "$rnlib/getactive"; then
active="$tmp/Pnact.$$";
rmlist="$rmlist $active";
cmdlist="$cmdlist $rnlib/getactive active $tmp/Pnact.$$";
fi
I would respectfully like to disagree with this change. The point should be
as Wayne had it originally, i.e. to check and see if the programs - that are
about to be invoked - exist and *are executable*. Just because Ultrix's (and
possibly NeXT's) /bin/sh is brain-damaged and don't support "-x" doesn't mean
that we should all have to suffer! If a "chmod -x $rnlib/getactive" got done
accidentally by some non-benevolent entry, this test would pass and the
command would be run even though it didn't have execute permission, which would
fail.
Can't we put this inside a "uname -s" test? Something like
if [ "`uname -s" = "Ultrix" ]
then
RORX="-r"
else
RORX="-x"
fi
if $test ! -f "$newsgroups" -a $RORX "$rnlib/getactive"; then
newsgroups="$tmp/Pnng.$$";
rmlist="$newsgroups";
cmdlist="$rnlib/getactive newsgroups $tmp/Pnng.$$ ; ";
fi
if $test ! -f "$active" -a $RORX "$rnlib/getactive"; then
active="$tmp/Pnact.$$";
rmlist="$rmlist $active";
cmdlist="$cmdlist $rnlib/getactive active $tmp/Pnact.$$";
fi
.. ??? Or am I missing something?
--
- Greg Earle
Phone: (818) 353-8695 FAX: (818) 353-1877 [Out of order now]
Internet: earle@isolar.Tujunga.CA.US
UUCP: isolar!earle@elroy.JPL.NASA.GOV a.k.a. ...!elroy!isolar!earle
Technical Details
Message-ID:
<23l9uu$dul@isolar.Tujunga.CA.US>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!sol.ctr.columbia.edu!math.ohio-state.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!isolar!isolar!not-for-mailReferences:
<236h1a$qt5@venus.haverford.edu> <CAw9A1.2AH@dutiws.twi.tudelft.nl>Show Full Headers
Complete Article Headers
Message-ID: <23l9uu$dul@isolar.Tujunga.CA.US> Subject: Re: trn 3.1 : compilation problems, and Pnews problem Date: Tue, 03 Aug 1993 09:08:46 +0000 From: earle@isolar.Tujunga.CA.US (Greg Earle) References: <236h1a$qt5@venus.haverford.edu> <CAw9A1.2AH@dutiws.twi.tudelft.nl> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmd.de!xlink.net!sol.ctr.columbia.edu!math.ohio-state.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!isolar!isolar!not-for-mail Newsgroups: news.software.readers Followup-To: news.software.readers Organization: Personal Usenet site, Tujunga, CA USA Lines: 65 Distribution: world NNTP-Posting-Host: isolar.tujunga.ca.us