changeset 2132:5319fe606ab3 draft

Pass the correct run directory to dhcpcd-run-hooks
author Roy Marples <roy@marples.name>
date Sat, 21 Sep 2013 14:31:06 +0000
parents 803530152d7c
children b6d5884b8598
files Makefile dhcpcd-run-hooks.in
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Sep 20 10:27:24 2013 +0000
+++ b/Makefile	Sat Sep 21 14:31:06 2013 +0000
@@ -30,6 +30,7 @@
 
 SUBDIRS=	dhcpcd-hooks ${MKDIRS}
 
+SED_RUNDIR=		-e 's:@RUNDIR@:${RUNDIR}:g'
 SED_DBDIR=		-e 's:@DBDIR@:${DBDIR}:g'
 SED_LIBDIR=		-e 's:@LIBDIR@:${LIBDIR}:g'
 SED_HOOKDIR=		-e 's:@HOOKDIR@:${HOOKDIR}:g'
@@ -58,8 +59,8 @@
 .SUFFIXES:	.in
 
 .in:
-	${SED} ${SED_DBDIR} ${SED_LIBDIR} ${SED_HOOKDIR} ${SED_SCRIPT} \
-		${SED_SYS} \
+	${SED} ${SED_RUNDIR} ${SED_DBDIR} ${SED_LIBDIR} ${SED_HOOKDIR} \
+		${SED_SYS} ${SED_SCRIPT} \
 		${SED_SERVICEEXISTS} ${SED_SERVICECMD} ${SED_SERVICESTATUS} \
 		$< > $@
 
--- a/dhcpcd-run-hooks.in	Fri Sep 20 10:27:24 2013 +0000
+++ b/dhcpcd-run-hooks.in	Sat Sep 21 14:31:06 2013 +0000
@@ -17,7 +17,7 @@
 signature="$signature_base $from $ifname"
 signature_base_end="# End of dhcpcd"
 signature_end="$signature_base_end $from $ifname"
-state_dir=/var/run/dhcpcd
+state_dir=@RUNDIR@/dhcpcd
 
 : ${if_up:=false}
 : ${if_down:=false}