v4: naming Sophos homedir

Sean Embry sean at NISD.NET
Fri Nov 22 19:14:37 GMT 2002


I use this little ditty when I'm dealing with files that move around.
Don't know how portable it is, and I'm sure I could use something other
than awk to parse the return. Doesn't seem to be too slow.


===>8   8<====
#! /bin/sh
# gp: Get Path - gets the path name for various files to keep
# moving files around easy.

PATHDATA=/usr/local/lib/pathnames

if [ ! -r $PATHDATA ]
    then
        echo "Error: Path database file $PATHDATA does not exsist or
cannot be read. I give up."
        exit 2
fi

if [ $# -ne 1 ]
    then
        echo "Usage: gp <sys tag of file to find>"
        exit 1
    else
        # Main loop
        gpno=`grep ^$1 $PATHDATA`
        gpng=$?
        if [ $gpng -ne 0 ]
            then
                exit 1
            else
                echo $gpno | awk '{print $2}'
        fi
fi
====>8   8<====

>>> steveb at CME.NIST.GOV 11/22/02 11:10AM >>>
On Fri, Nov 22, 2002 at 04:38:48PM +0000, Julian Field wrote:
> At 14:41 22/11/2002, you wrote:
> >Julian,
> >
> >   Can the homedir of sophos (and maybe other virus scanners) be
> >specified in mailscanner.conf, and then have the scripts:
> >
> >bin/Sophos.install
> >lib/sophos-autoupdate
> >lib/sophos-wrapper
> >
> >get the homedir definition from there?  I keep sophos in
> >/opt/sophos because /usr/local is NFS mounted.
>
> All of those scripts now live inside MailScanner's dir structure
rather
> than the virus scanner's dir, so they don't get lost when you upgrade
your
> virus scanner or anything like that.

Julian, I think his concern was more that upgrading mailscanner
was a pain because all these scripts had to be re-edited to
change the path to the virus scanners.  He wanted to put the
path prefixes in the mailscanner config file and make these
scripts use that prefix so that he only had to worry about bringing
over the config file with the new mailscanner install.  I have
the same problem and like his suggestion.

Steve



More information about the MailScanner mailing list