mcafee-autoupdate patch -- Tony Finch r-u-there?

Mariano Absatz mailscanner at LISTS.COM.AR
Tue Jul 1 19:49:27 IST 2003


Hi,

I use a slightly modified mcafee-autoupdate script that, when presented with
a "-v" option in the command line, spits some output (to stdout) including a
timestamp when it starts and when it ends, regardless of the fact that it
found a new .dat file or not.

Although everyone would hate having a mail message from cron every time the
command is run, some of us, like to redirect the output of the command into a
log file and eventually check how's everything going, even when there's
nothing new.

I recall seeing at least someone else asking for this, so I'm enclosing this
patch to current version (from MailScanner 4.22-4).

The patched version modifies (increases) the output when a "-v" option is
presented, but doesn't modify anything if the option is not given.

Tony, would you care to incorporate it (or suggest a modification, maybe
another different command line option)?

Regards.



*** mcafee-autoupdate.ORI       Tue Jul  1 15:36:56 2003
--- mcafee-autoupdate   Tue Jul  1 15:38:54 2003
***************
*** 27,32 ****
--- 27,40 ----
  PATH=$LIBDIR:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  export PATH

+ # keep cron quiet by default
+ case $1 in
+         -v)
+                 echo -n START:
+                 date +"   %Y:%m:%d-%H:%M:%S"
+                 echo $0 starting...
+ esac
+
  # version number pattern
  MATCH="[0-9][0-9][0-9][0-9]"

***************
*** 57,62 ****
--- 65,72 ----
          # keep cron quiet by default
          case $1 in
          -v)     echo Already have "$VERSION"
+                 echo -n END:
+                 date +"     %Y:%m:%d-%H:%M:%S"
          esac
          exit
  fi
***************
*** 128,133 ****

  echo
  echo Completed OK
!
!
  # done
--- 138,147 ----

  echo
  echo Completed OK
! case $1 in
!         -v)
!                 echo -n END:
!                 date +"     %Y:%m:%d-%H:%M:%S"
! esac
!
  # done





--
Mariano Absatz
El Baby
----------------------------------------------------------
Computers are only human.



More information about the MailScanner mailing list