https://bugzilla.novell.com/show_bug.cgi?id=706257
https://bugzilla.novell.com/show_bug.cgi?id=706257#c8
--- Comment #8 from Freek de Kruijf 2011-09-18 15:54:40 UTC ---
Rereading the manpage of checkproc I found that replacing amavisd by
$AMAVISD_BIN as the argument of checkproc is not right. The file
/usr/sbin/amavisd is a perl script and in that case IMHO the proper way is to
use amavisd.
I also read that the return code should be 0 when that process is active.
However that is not the case.
Below is the console log as root in my 12.1 M5 system with the above changes in
the /etc/init.d/amavis file.
eik121m5:~ # rcamavis status
Checking for service amavis (amavisd-new):
unused
eik121m5:~ # ps aux | grep amavis
root 2436 0.0 0.0 6780 856 pts/1 S+ 17:27 0:00 grep amavis
eik121m5:~ # rcamavis start
Starting virus-scanner (amavisd-new):
done
eik121m5:~ # ps aux | grep amavis
vscan 2497 15.1 10.2 222172 104240 ? Ss 17:28 0:01 amavisd
(master)
vscan 2500 0.0 10.1 223444 103264 ? S 17:28 0:00 amavisd
(virgin child)
vscan 2501 0.0 10.1 223444 103260 ? S 17:28 0:00 amavisd
(virgin child)
root 2507 0.0 0.0 6780 860 pts/1 S+ 17:28 0:00 grep amavis
eik121m5:~ # rcamavis status
Checking for service amavis (amavisd-new):
running
eik121m5:~ # checkproc amavisd ; echo $?
3
!!!! The above is wrong, checkproc should return 0, amavisd is active.!!!!!
!!!! 3 means no process and no pid file (maybe it was searched for /var/run/
!!!
eik121m5:~ # checkproc -p /var/spool/amavis/amavisd.pid amavisd ; echo $?
1
!!!! The above is wrong, checkproc should return 0, amavisd is active.!!!!!
!!!! 1 means no process, but there is a pid file. !!!!
eik121m5:~ # rcamavis stop
Shutting down virus-scanner (amavisd-new): Daemon [2497] terminated by SIGTERM
done
eik121m5:~ # checkproc -p /var/spool/amavis/amavisd.pid amavisd ; echo $?
3
eik121m5:~ # checkproc amavisd ; echo $?
3
eik121m5:~ #
So maybe the solution is that the pid file is stored in /var/run/, which
requires a change in /usr/sbin/amavisd
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.