Bug 722485

Summary: clamd-wrapper passes invalid arguments to functions from initscripts
Product: [Fedora] Fedora EPEL Reporter: angerman
Component: clamavAssignee: Steven Pritchard <steve>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el4CC: acasado, janfrode, nathanael, nb, redhat-bugzilla, steve
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-01 20:02:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Get rid of "-p pid" from clamd-wrapper none

Description angerman 2011-07-15 13:52:06 UTC
Created attachment 513384 [details]
Get rid of "-p pid" from clamd-wrapper

Description of problem:
/usr/share/clamav/clamd-wrapper passes PIDs to status, killproc and daemon functions found in the initscripts package. RHEL4 does not accept PIDs as arguments to these and other functions found in /etc/init.d/functions.

Version-Release number of selected component (if applicable):
clamav-0.97-13.el4

Comment 1 acasado 2011-12-19 12:10:30 UTC
Comment on attachment 513384 [details]
Get rid of "-p pid" from clamd-wrapper

>--- clamd-wrapper.org	2011-07-15 12:56:20.000000000 +0200
>+++ clamd-wrapper	2011-07-15 13:50:24.000000000 +0200
>@@ -41,8 +41,7 @@
> 
> start () {
> 	echo -n $"Starting $prog: "
>-	daemon --pidfile=${CLAMD_PIDFILE} \
>-	    exec -a $procname /usr/sbin/clamd \
>+	daemon /usr/sbin/$procname \
> 	    ${CLAMD_CONFIGFILE:+-c $CLAMD_CONFIGFILE} ${CLAMD_OPTIONS} --pid ${CLAMD_PIDFILE}
> 	RETVAL=$?
> 	echo
>@@ -52,7 +51,7 @@
> 
> stop () {
> 	echo -n $"Stopping $prog: "
>-	killproc -p ${CLAMD_PIDFILE} $procname
>+	killproc $procname
> 	RETVAL=$?
> 	echo
> 	[ $RETVAL -eq 0 ] && rm -f $lockfile
>@@ -62,10 +61,10 @@
> reload() {
> 	rc=0
> 	echo -n $"Reloading $prog: "
>-	killproc -p ${CLAMD_PIDFILE} $procname -SIGHUP  || rc=$?
>+	killproc $procname -SIGHUP  || rc=$?
> 	echo
> 	echo -n $"Loading new virus-database: "
>-	killproc -p ${CLAMD_PIDFILE} $procname -SIGUSR2 || rc=$?
>+	killproc $procname -SIGUSR2 || rc=$?
> 	echo
> 	return $rc
> }
>@@ -80,7 +79,7 @@
>   start|stop|restart|reload)
> 	$1 ;;
>   status)
>-	status -p ${CLAMD_PIDFILE} $procname ;;
>+	status  $procname ;;
>   condrestart)
> 	test ! -f $lockfile || restart
> 	;;

Comment 2 Kevin Fenzi 2012-03-01 20:02:40 UTC
EPEL-4 has reached end of life and is no longer supported. 

Please retest your bug against EPEL-5 or EPEL-6 and re-open if the bug persists in the packages available in those releases, or file a new bug. 

See: http://lists.fedoraproject.org/pipermail/epel-announce/2012-February/000015.html