diff --git a/dnsmasq.init b/dnsmasq.init index 4a9822b..d106a0c 100644 --- a/dnsmasq.init +++ b/dnsmasq.init @@ -24,6 +24,10 @@ if [ ! -z "${DOMAIN_SUFFIX}" ]; then OPTIONS="-s $DOMAIN_SUFFIX" fi +pidfile=${PIDFILE-/var/run/dnsmasq.pid} +lockfile=${LOCKFILE-/var/lock/subsys/dnsmasq} + + RETVAL=0 # See how we were called. @@ -33,16 +37,14 @@ case "$1" in daemon $dnsmasq $OPTIONS RETVAL=$? echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dnsmasq + [ $RETVAL -eq 0 ] && touch ${lockfile} ;; stop) - if test "x`pidof dnsmasq`" != x; then - echo -n "Shutting down dnsmasq: " - killproc dnsmasq - fi + echo -n "Shutting down dnsmasq: " + killproc -p ${pidfile} ${dnsmasq} RETVAL=$? echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsmasq /var/run/dnsmasq.pid + [ $RETVAL -eq 0 ] && rm -f ${lockfile} ${pidfile} ;; status) status dnsmasq @@ -50,7 +52,7 @@ case "$1" in ;; reload) echo -n "Reloading dnsmasq: " - killproc dnsmasq -HUP + killproc -p ${pidfile} ${dnsmasq} -HUP RETVAL=$? echo ;; diff --git a/dnsmasq.spec b/dnsmasq.spec index 9853e80..8654cf1 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -11,7 +11,7 @@ Name: dnsmasq Version: 2.51 -Release: 1%{?extraversion}%{?dist} +Release: 2%{?extraversion}%{?dist} Summary: A lightweight DHCP/caching DNS server Group: System Environment/Daemons @@ -118,6 +118,9 @@ fi %changelog +* Sun Nov 22 2009 Itamar Reis Peixoto - 2.51-2 +- fix bz 512664 + * Sat Oct 17 2009 Itamar Reis Peixoto - 2.51-1 - move initscript from patch to a plain text file - drop (dnsmasq-configuration.patch) and use sed instead