Use printf to get exact escaping for sed.
authorRoy Marples <roy@marples.name>
Tue, 21 Apr 2009 22:13:05 +0000 (22:13 +0000)
committerRoy Marples <roy@marples.name>
Tue, 21 Apr 2009 22:13:05 +0000 (22:13 +0000)
Makefile

index 7a46ba19c764f3f61004389d397cb330f87541e6..49af2133ee9aae9ad1411477c34cbd237d678e1e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,13 +22,13 @@ RESOLVCONF= resolvconf resolvconf.8 resolvconf.conf.5
 SUBSCRIBERS=   libc dnsmasq named pdns_recursor
 TARGET=                ${RESOLVCONF} ${SUBSCRIBERS}
 
-_CMD_SH=       if [ -x /sbin/rc-service ]; then \
-                       echo '/sbin/rc-service \\1 -- --ifstarted restart'; \
-               elif [ -d /etc/rc.d ]; then \
-                       echo '/etc/rc.d/\\1 status && /etc/rc.d/\\1 restart'; \
-               elif [ -d /etc/init.d ]; then \
-                       echo '/etc/init.d/\\1 status && /etc/rc.d/\\1 restart'; \
-               fi
+_CMD_SH=if [ -x /sbin/rc-service ]; then \
+               printf '/sbin/rc-service \\1 -- --ifstarted restart'; \
+       elif [ -d /etc/rc.d ]; then \
+               printf '/etc/rc.d/\\1 status \\&\\& /etc/rc.d/\\1 restart'; \
+       elif [ -d /etc/init.d ]; then \
+               printf '/etc/init.d/\\1 status \\&\\& /etc/rc.d/\\1 restart'; \
+       fi
 _CMD!=         ${_CMD_SH}
 RESTARTCMD?=   ${_CMD}$(shell ${_CMD_SH})