[Varnish] #981: /etc/init.d/varnish status always returns 0 on debian/ubuntu

Varnish varnish-bugs at varnish-cache.org
Wed Aug 17 02:06:08 CEST 2011


#981: /etc/init.d/varnish status always returns 0 on debian/ubuntu
--------------------------------------------+-------------------------------
 Reporter:  kane                            |        Type:  defect   
   Status:  new                             |    Priority:  normal   
Milestone:  After Varnish 2.1               |   Component:  packaging
  Version:  2.1.5                           |    Severity:  normal   
 Keywords:  init.d debian ubuntu packaging  |  
--------------------------------------------+-------------------------------
 That is because the return value of status_of_proc is ignored. This
 leads to problems with systems like Puppet, who check the return
 value of /etc/init.d/$service status to see if a service is running or
 not.

 The patch is trivial and follows how /etc/init.d/ssh does it.
 Unfortunately,
 I couldn't find the git repository holding the debian packaging, so I've
 added the patch inline below:

 --- /tmp/varnish        2011-08-16 23:58:41.000000000 +0000
 +++ /etc/init.d/varnish 2011-08-16 23:57:40.000000000 +0000
 @@ -85,7 +85,7 @@
  }

  status_varnishd() {
 -    status_of_proc -p "${PIDFILE}" "${DAEMON}" "${NAME}"
 +    status_of_proc -p "${PIDFILE}" "${DAEMON}" "${NAME}" && exit 0 ||
 exit $?
  }

  case "$1" in

-- 
Ticket URL: <http://varnish-cache.org/trac/ticket/981>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list