Two minor fixes?
Julian Field
MailScanner at ecs.soton.ac.uk
Mon Sep 3 16:54:46 IST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
shuttlebox wrote:
> I have some small problems I would like looked at if possible. First
> is the method of finding out the PID of MS in the check_mailscanner
> script. It doesn't always work in Solaris since the output gets
> truncated and depending on your path the whole string MailScanner
> might not be available. This is what happens on Blastwave installs,
> the path doesn't contain MailScanner with uppercase M and S and the
> process itself gets truncated:
>
> # ps -ef | grep Mail
> root 8174 1 0 15:38:34 ? 0:00 /opt/csw/bin/perl
> -I/opt/csw/mailscanner/lib /opt/csw/mailscanner/bin/MailScann
> # /usr/ucb/ps auxww | egrep
> /opt/csw/mailscanner/bin/MailScanner'|'MailScanner'[:]' | grep -v grep
> | awk '{print $2}'
> # pgrep MailScanner
> 8174
>
> Note that the first method returns nothing but pgrep works fine. I
> would suggest this simpler method, pgrep has been around since at
> least Solaris 8 so it should be safe to use:
>
> --- check_mailscanner Wed Aug 15 11:09:25 2007
> +++ check_mailscanner.orig Wed Aug 15 11:20:29 2007
> @@ -54,4 +54,5 @@
> FGREP=fgrep
> EGREP=egrep
> +PGREP=pgrep
> PS=ps
> UNAME='uname -a'
> @@ -71,8 +72,5 @@
> if $UNAME | $FGREP "SunOS" >/dev/null ; then
> # Version for Solaris/SysV systems:
> - pid=`/usr/ucb/ps auxww |
> - egrep $msbindir/$process'|'$process'[:]' |
> - grep -v grep |
> - awk '{print $2}'`
> + pid=`$PGREP $process`
>
What do the Blastwave guys think about using pgrep? Okay with you?
> elif $UNAME | $FGREP "HP" >/dev/null ; then
> # Version for HP-UX
>
> The next one (also minor) is about Perl modules when running
> MailScanner -v. Date::Parse (TimeDate) seems to be required but it's
> not listed at all.
>
TimeDate should be installed as part of the normal MailScanner install.
Is it missing from Blastwave?
Jules
- --
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.6.3 (Build 3017)
Comment: (pgp-secured)
Charset: ISO-8859-1
wj8DBQFG3C5GEfZZRxQVtlQRAmdKAJsG613+NCZS+b+Dg+lYwWQcLzTitwCgoZjT
qo9VyjD674Rm4IzCxxbvlfw=
=GcQK
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk
More information about the MailScanner
mailing list