Problem with update_virus_scanners script on Solaris
Julian Field
mailscanner at ecs.soton.ac.uk
Mon Sep 29 15:29:26 IST 2003
The very latest version of this code already contains this:
# Solaris requires xpg4 not normal grep for "-e" option
OS=`uname`
if [ "$OS" = "SunOS" ]; then
GREP=/usr/xpg4/bin/grep
else
GREP=grep
fi
cat ${SCANNERSCONF} | sed -e 's/#.*$//' | ${GREP} -e -wrapper | \
while read NAME WRAPPER PACKAGEDIR
do
which should solve the problem for you.
At 14:24 29/09/2003, you wrote:
>Greetings -
>
>MailScanner 4.23-11 includes a revised version of the
>bin/update_virus_scanners script. This appears to extract out details of
>the wrapper scripts from the etc/virus.scanners.conf file.
>
>Unfortunately on Solaris the code to do this doesn't work. In particular
>this section of code:
>
> cat ${SCANNERSCONF} | sed -e 's/#.*$//' | fgrep -e -wrapper | \
> while read NAME WRAPPER PACKAGEDIR
> do
> ...
>
>assumes 'grep' can take a '-e' option (to, I suspect, signal the next item
>is a pattern despite it beginning with a '-' character).
>
>The standard grep (/usr/bin/grep) on Solaris doesn't have such an option,
>and so the script fails.
>
>Two possible solutions:
>a) Change to use 'fgrep' instead of 'grep', or
>b) Change to use '/usr/xpg4/bin/grep' instead
>
>Of the two I'd suggest (a) is likely to be more cross-platform friendly ...
>unless of course you know differently?
>
>Cheers,
>
>Mike Brudenell
>
>--
>The Computing Service, University of York, Heslington, York Yo10 5DD, UK
>Tel:+44-1904-433811 FAX:+44-1904-433740
>
>* Unsolicited commercial e-mail is NOT welcome at this e-mail address. *
--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support
More information about the MailScanner
mailing list