Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd/sbin/dhcpcd Put correct init.d hooks int...



details:   https://anonhg.NetBSD.org/src/rev/db6ade1d08fc
branches:  trunk
changeset: 758599:db6ade1d08fc
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Nov 10 14:12:28 2010 +0000

description:
Put correct init.d hooks into dhcpcd-run-hooks.

diffstat:

 external/bsd/dhcpcd/sbin/dhcpcd/Makefile |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 42d4abad99be -r db6ade1d08fc external/bsd/dhcpcd/sbin/dhcpcd/Makefile
--- a/external/bsd/dhcpcd/sbin/dhcpcd/Makefile  Wed Nov 10 11:14:12 2010 +0000
+++ b/external/bsd/dhcpcd/sbin/dhcpcd/Makefile  Wed Nov 10 14:12:28 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2010/02/27 15:55:09 roy Exp $
+# $NetBSD: Makefile,v 1.8 2010/11/10 14:12:28 roy Exp $
 #
 
 PROG=          dhcpcd
@@ -34,11 +34,18 @@
 CLEANFILES=            dhcpcd.conf.5 dhcpcd.8 \
                        dhcpcd-run-hooks dhcpcd-run-hooks.8
 
+SERVICEEXISTS=         [ -x /etc/rc.d/$$1 ]
+SERVICECMD=            /etc/rc.d/$$1 $$2
+SERVICESTATUS=         service_command $$1 status >/dev/null 2>\&1
 .for f in dhcpcd-run-hooks dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
 ${f}:  ${f}.in
        ${TOOL_SED} -e 's:@SYSCONFDIR@:/etc:g' -e 's:@DBDIR@:/var/db:g' \
            -e 's:@HOOKDIR@:/libexec/dhcpcd-hooks:g' \
-           -e 's:@SCRIPT@:/libexec/dhcpcd-run-hooks:g' ${DIST}/${f}.in > $@
+           -e 's:@SCRIPT@:/libexec/dhcpcd-run-hooks:g' \
+           -e 's:@SERVICEEXISTS@:[ -x /etc/rc.d/$$1 ]:g' \
+           -e 's:@SERVICECMD@:/etc/rc.d/$$1 $$2:g' \
+           -e 's:@SERVICESTATUS@:service_command $$1 status >/dev/null 2>\&1:g' \
+           ${DIST}/${f}.in > $@
 .endfor
 
 .include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index