We need to ensure the service exists for rc-sevice and service commands.
authorRoy Marples <roy@marples.name>
Fri, 1 May 2009 15:13:25 +0000 (15:13 +0000)
committerRoy Marples <roy@marples.name>
Fri, 1 May 2009 15:13:25 +0000 (15:13 +0000)
Fixes #4 thanks to whiplash@pobox.com

Makefile

index 41eb5e9f7c5b3a352074b327f9f4c4e98ec54c4e..ad76ca174d0158ff6820060bac86632c7f62e16c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,9 +26,9 @@ TARGET=               ${RESOLVCONF} ${SUBSCRIBERS}
 _CMD1=         \\1 status >/dev/null 2>\\&1
 _CMD2=         \\1 restart
 _CMD_SH=if [ -x /sbin/rc-service ]; then \
-               printf '/sbin/rc-service \\1 -- -Ds restart'; \
+               printf '/sbin/rc-service -e \\1 \\&\\& /sbin/rc-service \\1 -- -Ds restart'; \
        elif [ -x /sbin/service ]; then \
-               printf '/sbin/service \\1 restart'; \
+               printf '/sbin/service ${_CMD1} \\&\\& /sbin/service ${_CMD2}'; \
        elif [ -d /usr/local/etc/rc.d ]; then \
                printf 'if /usr/local/etc/rc.d/${_CMD1}; then'; \
                printf ' /usr/local/etc/rc.d/${_CMD2}; '; \