Package: bind9
Version: 1:9.8.1.dfsg.P1-4.1
Severity: important

Dear Maintainer,
A couple of weeks ago, after an upgrade, when I rebooted my computer
bind9 did not start. During system loading, it failed and reported "No
networks configured".
I can't copy the exact message as I wasn't able to find those messages
in /var/log

I tried to remove, and then purge, bind9 and its related packages
(avahi-daemon bind9 bind9-host bind9utils dlint dnsutils gnome-nettool
gnome-user-share host libapache2-mod-dnssd libnss-mdns
pulseaudio-module-zeroconf telepathy-salut)

and after that removing the contents of /usr/share/bind9, /etc/bind and
/var/cache/bind, along with the three folders.

I cleaned APT cache, reinstalled bind9 (and all the other packages) but
when I rebooted, bind9 gave the same error.

The strange thing is that if I start BIND manually (sudo
/etc/init.d/bind9 start) it gives no errors.

The issue seems to origin in the init.d script, because it fails the
check_network() function.

Perhaps $network should be a Required-Start for a DNS server? (I know
that even Should-Start should do, but I believe networking is a required
feature for a DNS server, not an optional one) I tried to manually edit
the /etc/init.d/bind9 file, but insserv keeps giving it a S20 priority,
while network-manager is S21.

The "edited" file attached below, was edited but then restored to its
original settings.

Below, I attached the contents of my /etc/init.d/ and /etc/rc2.d/

Thanks,
Claudio

claudio@Chuck:~$ ls -1 /etc/init.d/
acpid
acpi-fakekey
acpi-support
alsa-utils
anacron
apmd
atd
avahi-daemon
bind9
binfmt-support
bluetooth
bootlogd
bootmisc.sh
bumblebeed
checkfs.sh
checkroot-bootclean.sh
checkroot.sh
console-setup
cpufrequtils
cron
cryptdisks
cryptdisks-early
cups
dbus
gdm3
halt
hdparm
hostapd
hostname.sh
hwclock.sh
ifupdown
ifupdown-clean
jetty
kbd
kerneloops
keyboard-setup
killprocs
kmod
loadcpufreq
minissdpd
motd
mountall-bootclean.sh
mountall.sh
mountdevsubfs.sh
mountkernfs.sh
mountnfs-bootclean.sh
mountnfs.sh
mtab.sh
networking
network-manager
nfs-common
ntp
nvidia-kernel
openvpn
pppd-dns
procps
pulseaudio
qemu-kvm
rc
rc.local
rcS
README
reboot
rmnologin
rpcbind
rsync
rsyslog
samba
saned
screen-cleanup
sendsigs
setkey
single
skeleton
ssh
stop-bootlogd
stop-bootlogd-single
sudo
timidity
udev
udev-mtab
umountfs
umountnfs.sh
umountroot
unattended-upgrades
urandom
webcamstudio
x11-common

claudio@Chuck:~$ ls -1 /etc/rc2.d/
README
S01motd
S01nvidia-kernel
S16rpcbind
S17nfs-common
S19acpi-fakekey
S19binfmt-support
S19hostapd
S19rsyslog
S19sudo
S20acpid
S20acpi-support
S20anacron
S20apmd
S20atd
S20bind9
S20dbus
S20loadcpufreq
S20ntp
S20ssh
S21avahi-daemon
S21bluetooth
S21cpufrequtils
S21cron
S21jetty
S21kerneloops
S21network-manager
S21rsync
S22openvpn
S23cups
S23gdm3
S23pulseaudio
S23saned
S24bumblebeed
S24samba
S25minissdpd
S25rc.local
S25rmnologin
S25stop-bootlogd

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (1001, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bind9 depends on:
ii  adduser                3.113+nmu3
ii  bind9utils             1:9.8.1.dfsg.P1-4.1
ii  debconf [debconf-2.0]  1.5.44
ii  libbind9-80            1:9.8.1.dfsg.P1-4.1
ii  libc6                  2.13-34
ii  libcap2                1:2.22-1.1
ii  libdns81               1:9.8.1.dfsg.P1-4.1
ii  libgssapi-krb5-2       1.10.1+dfsg-1
ii  libisc83               1:9.8.1.dfsg.P1-4.1
ii  libisccc80             1:9.8.1.dfsg.P1-4.1
ii  libisccfg82            1:9.8.1.dfsg.P1-4.1
ii  liblwres80             1:9.8.1.dfsg.P1-4.1
ii  libssl1.0.0            1.0.1c-3
ii  lsb-base               4.1+Debian7
ii  net-tools              1.60-24.1
ii  netbase                5.0

bind9 recommends no packages.

Versions of packages bind9 suggests:
pn  bind9-doc   <none>
ii  dnsutils    1:9.8.1.dfsg.P1-4.1
pn  resolvconf  <none>
pn  ufw         <none>

-- Configuration Files:
/etc/init.d/bind9 changed:
PATH=/sbin:/bin:/usr/sbin:/usr/bin
OPTIONS=""
RESOLVCONF=no
test -f /etc/default/bind9 && . /etc/default/bind9
test -x /usr/sbin/rndc || exit 0
.. /lib/lsb/init-functions
PIDFILE=/var/run/named/named.pid
check_network() {
    if [ -x /usr/bin/uname ] && [ "X$(/usr/bin/uname -o)" = XSolaris ]; then
        IFCONFIG_OPTS="-au"
    else
        IFCONFIG_OPTS=""
    fi
    if [ -z "$(/sbin/ifconfig $IFCONFIG_OPTS)" ]; then
       #log_action_msg "No networks configured."
       return 1
    fi
    return 0
}
case "$1" in
    start)
        log_daemon_msg "Starting domain name service..." "bind9"
        modprobe capability >/dev/null 2>&1 || true
        # dirs under /var/run can go away on reboots.
        mkdir -p /var/run/named
        chmod 775 /var/run/named
        chown root:bind /var/run/named >/dev/null 2>&1 || true
        if [ ! -x /usr/sbin/named ]; then
            log_action_msg "named binary missing - not starting"
            log_end_msg 1
        fi
        if ! check_network; then
            log_action_msg "no networks configured"
            log_end_msg 1
        fi
        if start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/named \
                --pidfile ${PIDFILE} -- $OPTIONS; then
            if [ "X$RESOLVCONF" != "Xno" ] && [ -x /sbin/resolvconf ] ; then
                echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.named
            fi
            log_end_msg 0
        else
            log_end_msg 1
        fi
    ;;
    stop)
        log_daemon_msg "Stopping domain name service..." "bind9"
        if ! check_network; then
            log_action_msg "no networks configured"
            log_end_msg 1
        fi
        if [ "X$RESOLVCONF" != "Xno" ] && [ -x /sbin/resolvconf ] ; then
            /sbin/resolvconf -d lo.named
        fi
        pid=$(/usr/sbin/rndc stop -p | awk '/^pid:/ {print $2}') || true
        if [ -z "$pid" ]; then          # no pid found, so either not running, 
or error
            pid=$(pgrep -f ^/usr/sbin/named) || true
            start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/named \
                    --pidfile ${PIDFILE} -- $OPTIONS
        fi
        if [ -n $pid ]; then
            sig=0
            n=1
            while kill -$sig $pid 2>/dev/null; do
                if [ $n -eq 1 ]; then
                    echo "waiting for pid $pid to die"
                fi
                if [ $n -eq 11 ]; then
                    echo "giving up on pid $pid with kill -0; trying -9"
                    sig=9
                fi
                if [ $n -gt 20 ]; then
                    echo "giving up on pid $pid"
                    break
                fi
                n=$(($n+1))
                sleep 1
            done
        fi
        log_end_msg 0
    ;;
    reload|force-reload)
        log_daemon_msg "Reloading domain name service..." "bind9"
        if ! check_network; then
            log_action_msg "no networks configured"
            log_end_msg 1
        fi
        /usr/sbin/rndc reload >/dev/null && log_end_msg 0 || log_end_msg 1
    ;;
    restart)
        if ! check_network; then
            log_action_msg "no networks configured"
            exit 1
        fi
        $0 stop
        $0 start
    ;;
    
    status)
        ret=0
        status_of_proc -p ${PIDFILE} /usr/sbin/named bind9 2>/dev/null || ret=$?
        exit $ret
        ;;
    *)
        log_action_msg "Usage: /etc/init.d/bind9 
{start|stop|reload|restart|force-reload|status}"
        exit 1
    ;;
esac
exit 0


-- debconf information:
  bind9/different-configuration-file:
  bind9/run-resolvconf: false
  bind9/start-as-user: bind



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to