c81c9a
diff -urN dnsmasq-2.33/rpm/dnsmasq.init dnsmasq-2.33-patched/rpm/dnsmasq.init
c81c9a
--- dnsmasq-2.33/rpm/dnsmasq.init	1969-12-31 18:00:00.000000000 -0600
c81c9a
+++ dnsmasq-2.33-patched/rpm/dnsmasq.init	2006-08-15 15:12:17.000000000 -0500
60068e
@@ -0,0 +1,75 @@
60068e
+#!/bin/sh
60068e
+#
60068e
+# Startup script for the DNS caching server
60068e
+#
60068e
+# chkconfig: - 99 01
60068e
+# description: This script starts your DNS caching server
60068e
+# processname: dnsmasq
60068e
+# pidfile: /var/run/dnsmasq.pid
60068e
+
60068e
+# Source function library.
60068e
+. /etc/rc.d/init.d/functions
60068e
+
60068e
+# Source networking configuration.
60068e
+. /etc/sysconfig/network
60068e
+
60068e
+# Check that networking is up.
60068e
+[ ${NETWORKING} = "no" ] && exit 0
60068e
+
60068e
+dnsmasq=/usr/sbin/dnsmasq
60068e
+[ -f $dnsmasq ] || exit 0
60068e
+
60068e
+DOMAIN_SUFFIX=`dnsdomainname`
60068e
+if [ ! -z "${DOMAIN_SUFFIX}" ]; then
60068e
+  OPTIONS="-s $DOMAIN_SUFFIX"
60068e
+fi
60068e
+
60068e
+RETVAL=0
60068e
+
60068e
+# See how we were called.
60068e
+case "$1" in
60068e
+  start)
60068e
+        echo -n "Starting dnsmasq: "
60068e
+        daemon $dnsmasq $OPTIONS
60068e
+	RETVAL=$?
60068e
+        echo
60068e
+        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dnsmasq
60068e
+        ;;
60068e
+  stop)
60068e
+        if test "x`pidof dnsmasq`" != x; then
60068e
+            echo -n "Shutting down dnsmasq: "
60068e
+            killproc dnsmasq
60068e
+        fi
60068e
+	RETVAL=$?
60068e
+        echo
60068e
+        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsmasq /var/run/dnsmasq.pid
60068e
+        ;;
60068e
+  status)
60068e
+	status dnsmasq
60068e
+	RETVAL=$?
60068e
+	;;
60068e
+  reload)
60068e
+	echo -n "Reloading dnsmasq: "
60068e
+	killproc dnsmasq -HUP
60068e
+	RETVAL=$?
60068e
+	echo
60068e
+	;;
60068e
+  restart)
60068e
+	$0 stop
60068e
+	$0 start
60068e
+	RETVAL=$?
60068e
+	;;
60068e
+  condrestart)
60068e
+	    if test "x`/sbin/pidof dnsmasq`" != x; then
60068e
+		$0 stop
60068e
+		$0 start
60068e
+		RETVAL=$?
60068e
+	    fi
60068e
+	    ;;
60068e
+  *)
60068e
+        echo "Usage: $0 {start|stop|restart|reload|condrestart|status}"
60068e
+        exit 1
60068e
+esac
60068e
+
60068e
+exit $RETVAL
60068e
+