[Varnish] #107: Varnish 1.0.4 RPM for RHEL 4 has broken init.d script

Varnish varnish-bugs at projects.linpro.no
Sat May 26 07:23:39 CEST 2007


#107: Varnish 1.0.4 RPM for RHEL 4 has broken init.d script
-----------------------+----------------------------------------------------
 Reporter:  dstoliker  |       Owner:  des  
     Type:  defect     |      Status:  new  
 Priority:  normal     |   Milestone:       
Component:  build      |     Version:  trunk
 Severity:  normal     |    Keywords:       
-----------------------+----------------------------------------------------
 The problem appears to lie in the different syntax of the functions
 included with /etc/init.d/functions dealing with pid files.

 For example, the v1.0.4 script start clause includes:
  daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} >
  /dev/null 2>&1

 The daemon function included in CentOS4 (and presumably RHEL4) doesn't
 take the argument "--pidfile" whereas the version included with CentOS5
 does.

 I've hacked up the init script and it ''seems'' work for CentOS4 - at
 least it starts, stops, restarts, reports status, and appears to function
 as expected. I don't really know or fully understand what functionality
 I've stripped out so YMMV.

 Here is the diff of the hacked up version and the original:

 {{{
 41c41
 <           daemon ${DAEMON} "$DAEMON_OPTS" -P ${PIDFILE} > /dev/null 2>&1
 ---
 >           daemon --pidfile ${PIDFILE} ${DAEMON} "$DAEMON_OPTS" -P
 ${PIDFILE} > /dev/null 2>&1
 57c57
 <       killproc $DAEMON
 ---
 >       killproc -p $PIDFILE $DAEMON
 69c69
 <       status $PROCNAME
 ---
 >       status -p $PIDFILE $PROCNAME
 }}}

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/107>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list