View | Details | Raw Unified | Return to bug 136845
Collapse All | Expand All

(-)Makefile (-8 / +3 lines)
Lines 5-10 Link Here
5
5
6
PORTNAME=	ifdepd
6
PORTNAME=	ifdepd
7
PORTVERSION=	20050420
7
PORTVERSION=	20050420
8
PORTREVISION=	1
8
CATEGORIES=	net
9
CATEGORIES=	net
9
MASTER_SITES=	http://alex.bmg.gv.at/programs/
10
MASTER_SITES=	http://alex.bmg.gv.at/programs/
10
11
Lines 13-27 Link Here
13
14
14
MAN8=		ifdepd.8
15
MAN8=		ifdepd.8
15
16
16
PLIST_FILES=	bin/ifdepd \
17
PLIST_FILES=	bin/ifdepd
17
		etc/rc.d/ifdepd.sh
18
18
19
USE_RC_SUBR=	yes
19
USE_RC_SUBR=	${PORTNAME}
20
21
post-patch:
22
	@${REINPLACE_CMD} -e \
23
		's|/etc/rc\.subr|${RC_SUBR}|; s|/usr/local|${PREFIX}|' \
24
		${WRKSRC}/ifdepd.sh
25
20
26
post-install:
21
post-install:
27
	@${CAT} ${PKGMESSAGE}
22
	@${CAT} ${PKGMESSAGE}
(-)files/ifdepd.in (+45 lines)
Added Link Here
1
#!/bin/sh
2
#
3
4
# PROVIDE: ifdepd
5
# REQUIRE: netif routing
6
# KEYWORD: FreeBSD shutdown
7
8
#
9
# Add the following lines to /etc/rc.conf to enable ifdepd:
10
#
11
#ifdepd_enable="YES"
12
#ifdepd_src_ifaces="em0:em1"
13
#ifdepd_dst_ifaces="carp1"
14
15
. /etc/rc.subr
16
17
name="ifdepd"
18
rcvar=`set_rcvar`
19
command="/usr/local/bin/ifdepd"
20
start_cmd="ifdepd_start"
21
stop_cmd="ifdepd_stop"
22
23
ifdepd_enable=${ifdepd_enable:-"NO"}
24
load_rc_config $name
25
26
ifdepd_start()
27
{
28
	echo 'Starting ifdepd.'
29
	ifdepd_src_ifaces=`echo $ifdepd_src_ifaces | sed -E 's/[ \t]+/:/g'`
30
	ifdepd_dst_ifaces=`echo $ifdepd_dst_ifaces | sed -E 's/[ \t]+/:/g'`
31
	if checkyesno ${rcvar} && [ "x${ifdepd_src_ifaces}" != "x" ] &&
32
	   [ "x${ifdepd_dst_ifaces}" != "x" ]; then
33
		$command -d -S ${ifdepd_src_ifaces} -D ${ifdepd_dst_ifaces}
34
	else
35
		warn '$ifdepd_ifaces is not set.'
36
	fi
37
}
38
39
ifdepd_stop()
40
{
41
	echo 'Stopping ifdepd.'
42
	killall ifdepd
43
}
44
45
run_rc_command "$1"

Return to bug 136845