Fix mandir again
[openresolv] / named
diff --git a/named b/named
index b31282e72cbe4b3500f837c5e9a585de5dbac192..91ebc8cd8d5ee4ee8c30307cf4b35f34ce9f1580 100755 (executable)
--- a/named
+++ b/named
@@ -53,7 +53,8 @@ VARS="$(resolvconf -v)"
 eval "${VARS}"
 
 # If our dir doesn't exist then don't do anything
 eval "${VARS}"
 
 # If our dir doesn't exist then don't do anything
-NAMEDB=${NAMEDB:-/etc/namedb}
+NAMEDB=/etc/namedb
+[ -d "${NAMEDB}" ] || NAMEDB="/etc/bind"
 [ -d "${NAMEDB}" ] || exit 0
 
 NAMEDOPTIONS="${NAMEDB}/resolvconf-options.conf"
 [ -d "${NAMEDB}" ] || exit 0
 
 NAMEDOPTIONS="${NAMEDB}/resolvconf-options.conf"
@@ -120,15 +121,6 @@ else
        RELOAD="yes"
 fi
 
        RELOAD="yes"
 fi
 
-if [ "${RELOAD}" = "yes" ]; then
-       # OpenRC style
-       if [ -x /etc/init.d/named -a -x /sbin/runscript ]; then
-               /etc/init.d/named --nodeps --quiet conditionalrestart
-       fi
-       # BSD RC style
-       if [ -x /etc/rc.d/named -a -s /var/run/named/pid ]; then
-               kill -0 $(cat /var/run/named/pid) && /etc/rc.d/named restart
-       fi
-fi
+[ "${RELOAD}" = "yes" ] && resolvconf -s named restart
 
 exit 0
 
 exit 0