R: F-prot update script

Rick Cooper rcooper at DIMENSION-FLM.COM
Mon Dec 15 18:17:18 GMT 2003


It would appear from looking at the code that he should be able
to call the script with the cron or quiet options (as with the
standard f-prot autoupdate)

foreach (@ARGV) {
  if (/cron/i) {
    $cron = 1;
  } elsif (/quiet/i) {
    $quiet = 1;
  } else {
    BailOut("Invalid command-line option \"$_\"");
  }
}


but when you use quiet||cron you get

Installation dir "quiet||cron" does not exist!
Cannot cd quiet||cron, No such file or directory at
./f-prot-autoupdate line 361.

because of the use of shift on line 38 (checking for the
update_virus_scanners supplied PackageDir)

I have attached a patch that will let the script function as
intended with the following command line convention. If you are
calling the script with a non-standard package dir (not
/usr/local/f-prot) then it must come first (to maintain
compatability with update_virus_scanners ) with the "quiet" or
"cron" option following:

/opt/MailScanner/lib/f-prot-autoupdate /some/other/dir cron|quiet

if the package dir is /usr/local/f-prot then
/opt/MailScanner/lib/f-prot-autoupdate cron|quiet

cron option = don't print to stderr unless there is an error or
an update
quiet option = don't print to stderr unless there is an error

( the patch also fixes the "Nothing to be done" message so it
doesn't print with the quiet option)

Something I noticed but did not "fix" because I didn't know if it
was on purpose or not, The update_virus_scanners script logs to
mail.info but the f-prot autoupdate script just logges to info so
it ends up in the standard syslog (messages for me), and it also
doesn't log quite the same info so it's not aligned... if that is
a mistake then changing line 231 to

Sys::Syslog::syslog('mail.info', $updated?"update.virus.scanners:
F-Prot successfully updated.":"update.virus.scanners: F-Prot did
not need updating.");

Addresses both of those issues
> -----Original Message-----
> From: MailScanner mailing list
> [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
> Behalf Of Julian Field
> Sent: Monday, December 15, 2003 10:07 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: R: F-prot update script
>
>
> Search through the script for the logging lines that
> produce the output you
> don't want and comment them out.
>
> At 15:01 15/12/2003, you wrote:
> >I'm running the f-prot-autoupdate script,
> >if I run the update_virus_scanners script I receive
> no emails, but I wish to
> >use the f-prot-autoupdate script directly to run
> separately the updates for
> >both f-prot and Antivir ..
> >
> >
> >-----Messaggio originale-----
> >Da: Julian Field [mailto:mailscanner at ecs.soton.ac.uk]
> >Inviato: lunedì 15 dicembre 2003 15.25
> >A: gioia at bclink.it
> >Cc: mailscanner at jiscmail.ac.uk
> >Oggetto: Re: F-prot update script
> >
> >
> >At 13:52 15/12/2003, you wrote:
> > >Hi all!
> > >
> > >how can I disable the f-prot-autoupdate script
> option to not send email
> > >notifications if it did not need to be updated ?
> > >I wouldn't receive this every hour..
> > >
> > >------------------------
> > >FTP address for retrieving files is
> ftp://us-3.updates.f-prot.com/pub/
> > >File SIGN.DEF is already up to date.
> > >File SIGN2.DEF is already up to date.
> > >File MACRO.DEF is already up to date.
> > >Nothing to be done.
> > >------------------------
> >
> >Is your cron job calling update_virus_scanners or
> calling f-prot-autoupdate
> >directly?
> >
> > >I've had some experiences with Sophos Antivirus
> too, and I noticed that it
> > >downloads new ide files as soon as they were realeased ..
> > >it's not possible to have the same feature with
> other Antivirus software as
> > >f-prot and Antivir ?!
> >
> >My sophos-autoupdate script just updates hourly, the
> same as all the others.
> >--
> >Julian Field
> >www.MailScanner.info
> >MailScanner thanks transtec Computers for their support
> >
> >PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6
> 5947 1415 B654
>
> --
> Julian Field
> www.MailScanner.info
> MailScanner thanks transtec Computers for their support
>
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947
> 1415 B654
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpauto.patch
Type: application/octet-stream
Size: 343 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20031215/f5e45bf6/fpauto.obj


More information about the MailScanner mailing list