#!/bin/sh
#
# named -- start or stop the DNS daemon

case "$1" in
start)
    need network

    if [ -x /usr/sbin/named ]; then
	echo "starting DNS services"
	/usr/sbin/named
    fi
    ;;
info)
    echo "DNS services"
    ;;
stop)
    if [ -r /var/run/named.pid ]; then
	echo "stopping DNS services"
	PID=`cat /var/run/named.pid`
	${PID:+kill $PID}
	killall -KILL named-xfer
    fi
    ;;
*)
    echo "usage: $0 {start|stop}"
    ;;
esac
