Subject: Bug#3506: nameserver can fail to start

From: Ian Jackson <[email-masked]>
Date: Wed, 3 Jul 96 21:23 BST

Package: bind
Version: 4.9.3-BETA24-1

For some reason /var/run/named.pid didn't exist when my system tried
to boot.  Perhaps /var/run is cleared out earlier in the bootup
process.

The result of this was that `/etc/init.d/bind start' didn't start the
nameserver.  The relevant bit is:

start)
        if grep -qv "^;.*" /etc/named.boot; then
                echo "Starting Internet domain name server"
                ndc start >/dev/null
        fi
        ;;

I ran it by hand, and saw:
-root@chiark:~> /etc/init.d/bind start
Starting Internet domain name server
[ my logs showed nothing happening ]
-root@chiark:~> /etc/init.d/bind start
Starting Internet domain name server
[ again ]
-root@chiark:~> ndc start
ndc: /var/run/named.pid does not exist
-root@chiark:~> touch /var/run/named.pid
-root@chiark:~> ndc start
usage: grep [-[[AB] ]<num>] [-[CEFGVchilnqsvwx]] [-[ef]] <expr> [<files...>]
Name Server Started
-root@chiark:~> 

So (a) ndc start shouldn't fail if /var/run/named.pid doesn't exist,
(b) it should print its error messages to stderr so that we'd know
that something was wrong, and (c) it should not pass garbage arguments
to `grep'.

Ian.