fix dnsmasq.init bz 512664

This commit is contained in:
Itamar Reis Peixoto 2009-11-22 11:47:49 +00:00
parent fa07928015
commit 243a5a3627
2 changed files with 13 additions and 8 deletions

View File

@ -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
;;

View File

@ -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 <itamar@ispbrasil.com.br> - 2.51-2
- fix bz 512664
* Sat Oct 17 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 2.51-1
- move initscript from patch to a plain text file
- drop (dnsmasq-configuration.patch) and use sed instead