Don't rely on /etc/init.d being OpenRC
[openresolv] / named
diff --git a/named b/named
index b31282e72cbe4b3500f837c5e9a585de5dbac192..86cbf7c5ed74a75a33191782ea53d3d2559b60eb 100755 (executable)
--- a/named
+++ b/named
@@ -122,8 +122,12 @@ 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
+       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 -a -s /var/run/named/pid ]; then