svn commit: r303593 - head/sbin/resolvconf

Pedro F. Giffuni pfg at FreeBSD.org
Sun Jul 31 18:14:43 UTC 2016


Author: pfg
Date: Sun Jul 31 18:14:42 2016
New Revision: 303593
URL: https://svnweb.freebsd.org/changeset/base/303593

Log:
  resolvconf(8) now needs an additional @RESTARTCMD@ replacement when installing.
  
  After r303062, which brought openresolv 3.8.1, we need to replace an
  additional @RESTARTCMD@ in resolvconf.
  Apply a read fix this time.
  
  Submitted by:	Guy Yur
  X-MFC with:	r303062

Modified:
  head/sbin/resolvconf/Makefile

Modified: head/sbin/resolvconf/Makefile
==============================================================================
--- head/sbin/resolvconf/Makefile	Sun Jul 31 17:53:09 2016	(r303592)
+++ head/sbin/resolvconf/Makefile	Sun Jul 31 18:14:42 2016	(r303593)
@@ -19,9 +19,12 @@ VARDIR=		/var/run/resolvconf
 
 # We don't assume to restart the services in /sbin.  So, though
 # our service(8) is in /usr/sbin, we can use it, here.
-CMD1=		\1 onestatus >/dev/null 2>\&1
-CMD2=		\1 restart
-RESTARTCMD=	/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}
+CMD1_WITH_ARG=		\1 onestatus >/dev/null 2>\&1
+CMD2_WITH_ARG=		\1 restart
+RESTARTCMD_WITH_ARG=	/usr/sbin/service ${CMD1_WITH_ARG} \&\& /usr/sbin/service ${CMD2_WITH_ARG}
+CMD1=		\\$$1 onestatus >/dev/null 2>\&1
+CMD2=		\\$$1 restart
+RESTARTCMD=	"/usr/sbin/service ${CMD1} \&\& /usr/sbin/service ${CMD2}"
 
 .for f in ${SCRIPTS} ${FILES} ${MAN}
 ${f}:	${f}.in
@@ -29,8 +32,8 @@ ${f}:	${f}.in
 		-e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \
 		-e 's:@LIBEXECDIR@:${FILESDIR}:g' \
 		-e 's:@VARDIR@:${VARDIR}:g' \
-		-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \
-		-e 's:@RESTARTCMD@:${RESTARTCMD_}:g' \
+		-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD_WITH_ARG}:g' \
+		-e 's:@RESTARTCMD@:${RESTARTCMD}:g' \
 		-e 's:@RCDIR@:${RCDIR}:g' \
 		-e 's: vpn : ng[0-9]*&:g' \
 		${DIST}/$@.in > $@


More information about the svn-src-head mailing list