<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=462140310-29102002><FONT face=Arial color=#0000ff size=2>Genius
- works a treat</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> MailScanner
mailing list [mailto:MAILSCANNER@JISCMAIL.AC.UK] <B>On Behalf Of </B>Paul
Houselander<BR><B>Sent:</B> 29 October 2002 10:02<BR><B>To:</B>
MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B> Re: Directorys in
/var/spool/MailScanner/incoming<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I didnt replace it I just placed it below
e.g.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> # Next try
"pidof"<BR> pid=`pidof
$1`<BR> if [ "$pid" != "" ] ;
then<BR>
echo $pid
<BR>
return 0<BR> fi</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> # Next try
"pidof"<BR> pidof -o $$ -o $PPID -o
%PPID -x $1 || \<BR> pidof -o $$ -o
$PPID -o %PPID -x ${base}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Paul</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=gavin@NETERGY.COM href="mailto:gavin@NETERGY.COM">Gavin
Nelmes-Crocker</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=MAILSCANNER@JISCMAIL.AC.UK
href="mailto:MAILSCANNER@JISCMAIL.AC.UK">MAILSCANNER@JISCMAIL.AC.UK</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, October 29, 2002 9:51
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Directorys in
/var/spool/MailScanner/incoming</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=730065009-29102002><FONT face=Arial color=#0000ff
size=2>could you just make it a bit clearer for me please - where exactly
did you insert this in below - do you replace the current #next try pidof ?
- I'm using a dev box but its easier to get it right first time
:-)</FONT></SPAN></DIV>
<DIV><SPAN class=730065009-29102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=730065009-29102002><FONT face=Arial color=#0000ff
size=2>Thanks Gavin</FONT></SPAN></DIV>
<DIV><SPAN class=730065009-29102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=730065009-29102002><FONT face=Arial color=#0000ff size=2>#
A function to find the pid of a program.<BR>pidofproc()
{<BR> # Test
syntax.<BR> if [ $# = 0 ] ;
then<BR>
echo "Usage: pidofproc
{program}"<BR>
return 1<BR>
fi<BR>
<BR> # First try "/var/run/*.pid"
files<BR> if [ -f /var/run/$1.pid
] ; then
<BR>
pid=`head -1
/var/run/$1.pid`<BR>
if [ "$pid" != "" ] ;
then<BR>
echo
$pid<BR>
return
0<BR>
fi<BR>
fi<BR>
<BR> # Next try
"pidof"<BR> pid=`pidof
$1`<BR> if [ "$pid" != "" ] ;
then<BR>
echo $pid
<BR>
return 0<BR>
fi<BR>
<BR> # Finally try to extract it
from ps<BR> ps ax | awk 'BEGIN {
prog=ARGV[1]; ARGC=1
}<BR>
{ if ((prog == $5) || (("(" prog ")") == $5)
||<BR>
(("[" prog "]") == $5)
||<BR>
((prog ":") == $5)) { print $1 ; exit 0 } }'
$1<BR>}<BR> </FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> MailScanner
mailing list [mailto:MAILSCANNER@JISCMAIL.AC.UK] <B>On Behalf Of </B>Paul
Houselander<BR><B>Sent:</B> 29 October 2002 08:48<BR><B>To:</B>
MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B> Re: Directorys in
/var/spool/MailScanner/incoming<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>My initial question did not relate to a
cobalt, but I do have access to a Raq4 so tried it out and have the
same problem with the init script not successfully stopping MailScanner,
however it does work fine on my RedHat 7.2 system.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>On the cobalt, the
pidofproc function in /etc/rc.d/init.d/functions does not
return anything. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>However, after comparing the
pidofproc function on the cobalt and redhat systems I added (after
making a backup of "functions")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> # Next try
"pidof"<BR> pidof -o $$ -o $PPID
-o %PPID -x $1 || \<BR> pidof -o
$$ -o $PPID -o %PPID -x ${base}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>To the pidofproc function on the cobalt, now
the init script works fine and is able to stop mailscanner.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>As Cobalts are strange beasts I dont know
whether this is going to break anything else, but seems ok at the
moment.</DIV>
<DIV> </DIV>
<DIV>Cheers</DIV>
<DIV> </DIV>
<DIV>Paul</DIV>
<DIV> </DIV>
<DIV></FONT>----- Original Message ----- </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=gavin@NETERGY.COM href="mailto:gavin@NETERGY.COM">Gavin
Nelmes-Crocker</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=MAILSCANNER@JISCMAIL.AC.UK
href="mailto:MAILSCANNER@JISCMAIL.AC.UK">MAILSCANNER@JISCMAIL.AC.UK</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, October 28, 2002 5:32
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Directorys in
/var/spool/MailScanner/incoming</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2>this also matches with mine and a a couple of others problem but
on a Cobalt RaQ in the the init script doesn't stop the mailscanner has
the init script got broken somewhere? this section seems to be related
to all the PIDs for mailscanner but its commented out and I couldn't
find any killproc info for Mailscanner in the init file - but then this
bit is a bit of mystery for me anyway.</FONT></SPAN></DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2># Get a string of all the PIDs of
MailScanner<BR>#MailScannerPids()
{<BR># cd $PIDDIR || return
1<BR># PIDLIST=`ls | grep
'^MailScanner.' | sed -e
's/MailScanner.//g'`<BR># echo
PIDLIST<BR># return
0<BR>#}</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2>Regards</FONT></SPAN></DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2>Gavin</FONT></SPAN></DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2>ps I also have a whole bunch of PIDs in /var/spool/Mailscanner
which don't get deleted</FONT></SPAN></DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=337222717-28102002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
MailScanner mailing list [mailto:MAILSCANNER@JISCMAIL.AC.UK] <B>On
Behalf Of </B>Paul Houselander<BR><B>Sent:</B> 28 October 2002
16:50<BR><B>To:</B> MAILSCANNER@JISCMAIL.AC.UK<BR><B>Subject:</B>
Directorys in /var/spool/MailScanner/incoming<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Im using</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>RedHat 7.2 and the rpm MailScanner
4.03-1</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I seem to recall this being discussed but
cant find any previous mention of it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Directorys with the same name as the pid
are being created in /var/spool/MailScanner/incoming, but are not
being cleaned up on a restart or stop - is this as it should
be?.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is their any resason I should not delete
them in the stop and restart parts of
/etc/rc.d/init.d/MailScanner</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Paul</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><BR>-- <BR>This
message has been scanned for viruses and <BR>dangerous content by <A
href="http://www.mailscanner.info/"><B>MailScanner</B></A>, and
is<BR>believed to be clean. </BLOCKQUOTE><BR>-- <BR>This message has
been scanned for viruses and <BR>dangerous content by <A
href="http://www.mailscanner.info/"><B>MailScanner</B></A>, and
is<BR>believed to be clean. </BLOCKQUOTE><BR>-- <BR>This message has been
scanned for viruses and <BR>dangerous content by <A
href="http://www.mailscanner.info/"><B>MailScanner</B></A>, and
is<BR>believed to be clean. </BLOCKQUOTE><BR>-- <BR>This message has been
scanned for viruses and <BR>dangerous content by <A
href="http://www.mailscanner.info/"><B>MailScanner</B></A>, and
is<BR>believed to be clean. </BLOCKQUOTE><BR>-- <BR>This message has been
scanned for viruses and <BR>dangerous content by <A
href="http://www.mailscanner.info/"><B>MailScanner</B></A>, and is<BR>believed
to be clean. </BLOCKQUOTE></BODY></HTML>