diff options
author | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2009-07-17 18:41:08 +0000 |
---|---|---|
committer | Philip M. Gollucci <pgollucci@FreeBSD.org> | 2009-07-17 18:41:08 +0000 |
commit | 7a31dc6ff77d0e02ae4b8b4be48a07858a3f6381 (patch) | |
tree | 99eadb93bbcb3d2a32e6ca7383947b75b82c622a /net/ifdepd | |
parent | deffef2f51fe24c1c44ce1b789af8832e1329a00 (diff) | |
download | ports-7a31dc6ff77d0e02ae4b8b4be48a07858a3f6381.tar.gz ports-7a31dc6ff77d0e02ae4b8b4be48a07858a3f6381.zip |
Notes
Diffstat (limited to 'net/ifdepd')
-rw-r--r-- | net/ifdepd/Makefile | 11 | ||||
-rw-r--r-- | net/ifdepd/files/ifdepd.in | 45 | ||||
-rw-r--r-- | net/ifdepd/files/patch-Makefile | 15 |
3 files changed, 59 insertions, 12 deletions
diff --git a/net/ifdepd/Makefile b/net/ifdepd/Makefile index 4d97ae4f5060..103916714975 100644 --- a/net/ifdepd/Makefile +++ b/net/ifdepd/Makefile @@ -5,6 +5,7 @@ PORTNAME= ifdepd PORTVERSION= 20050420 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://alex.bmg.gv.at/programs/ @@ -13,15 +14,9 @@ COMMENT= Interface Dependancy daemon MAN8= ifdepd.8 -PLIST_FILES= bin/ifdepd \ - etc/rc.d/ifdepd.sh +PLIST_FILES= bin/ifdepd -USE_RC_SUBR= yes - -post-patch: - @${REINPLACE_CMD} -e \ - 's|/etc/rc\.subr|${RC_SUBR}|; s|/usr/local|${PREFIX}|' \ - ${WRKSRC}/ifdepd.sh +USE_RC_SUBR= ${PORTNAME} post-install: @${CAT} ${PKGMESSAGE} diff --git a/net/ifdepd/files/ifdepd.in b/net/ifdepd/files/ifdepd.in new file mode 100644 index 000000000000..43d759444803 --- /dev/null +++ b/net/ifdepd/files/ifdepd.in @@ -0,0 +1,45 @@ +#!/bin/sh +# + +# PROVIDE: ifdepd +# REQUIRE: netif routing +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable ifdepd: +# +#ifdepd_enable="YES" +#ifdepd_src_ifaces="em0:em1" +#ifdepd_dst_ifaces="carp1" + +. /etc/rc.subr + +name="ifdepd" +rcvar=`set_rcvar` +command="/usr/local/bin/ifdepd" +start_cmd="ifdepd_start" +stop_cmd="ifdepd_stop" + +ifdepd_enable=${ifdepd_enable:-"NO"} +load_rc_config $name + +ifdepd_start() +{ + echo 'Starting ifdepd.' + ifdepd_src_ifaces=`echo $ifdepd_src_ifaces | sed -E 's/[ \t]+/:/g'` + ifdepd_dst_ifaces=`echo $ifdepd_dst_ifaces | sed -E 's/[ \t]+/:/g'` + if checkyesno ${rcvar} && [ "x${ifdepd_src_ifaces}" != "x" ] && + [ "x${ifdepd_dst_ifaces}" != "x" ]; then + $command -d -S ${ifdepd_src_ifaces} -D ${ifdepd_dst_ifaces} + else + warn '$ifdepd_ifaces is not set.' + fi +} + +ifdepd_stop() +{ + echo 'Stopping ifdepd.' + killall ifdepd +} + +run_rc_command "$1" diff --git a/net/ifdepd/files/patch-Makefile b/net/ifdepd/files/patch-Makefile index 3440d0cc4214..15a65095e810 100644 --- a/net/ifdepd/files/patch-Makefile +++ b/net/ifdepd/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig Wed Apr 20 15:30:18 2005 -+++ Makefile Fri Apr 22 16:12:43 2005 +--- ./Makefile.orig 2005-04-20 09:30:18.000000000 -0400 ++++ ./Makefile 2009-07-17 14:38:38.391992090 -0400 @@ -4,10 +4,8 @@ PROG = ifdepd RM = rm -f @@ -12,7 +12,7 @@ MAN8 = ifdepd.8 OBJ = ifdepd.o -@@ -22,18 +20,14 @@ +@@ -22,18 +20,13 @@ ${RM} *.o ${PROJ} *.core core ${PROG} tags *.err install: ${PROG} @@ -29,8 +29,15 @@ ${RM} ${PREFIX}/bin/${PROG} ${RM} ${PREFIX}/man/man8/${PROG}.8 -.if ${OSTYPE}!="OpenBSD" - ${RM} ${PREFIX}/etc/rc.d/${PROG}.sh +- ${RM} ${PREFIX}/etc/rc.d/${PROG}.sh -.endif ${PROG}: ${OBJ} ${CC} ${CFLAGS} -o ${PROG} ${OBJ} ${LIBS} +@@ -41,4 +34,4 @@ + %.o: %.cc %.H %.h + $(CCXX) $(CXXFLAGS) -c $< + +-#.include <bsd.prog.mk> +\ No newline at end of file ++#.include <bsd.prog.mk> |