Respect MANPREFIX
[openresolv] / named
diff --git a/named b/named
index df7a196ca17f16413048c366fff56aff9b45284b..86cbf7c5ed74a75a33191782ea53d3d2559b60eb 100755 (executable)
--- a/named
+++ b/named
@@ -122,12 +122,16 @@ fi
 
 if [ "${RELOAD}" = "yes" ]; then
        # OpenRC style
-       if [ -x /etc/init.d/named ] ; then
-               /etc/init.d/named --nodeps --quiet conditionalrestart
+       if [ -x /etc/init.d/named ]; then
+               if [ -x /sbin/runscript ]; then
+                       /etc/init.d/named --nodeps --quiet conditionalrestart
+               else
+                       /etc/init.d/named restart
+               fi
        fi
        # BSD RC style
-       if [ -x /etc/rc.d/named ]; then
-               /etc/rc.d/named restart
+       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