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

(-)Makefile (-7 / +5 lines)
Lines 20-27 Link Here
20
20
21
CONFLICTS=	openbgpd-[0-9]* quagga-[0-9]*
21
CONFLICTS=	openbgpd-[0-9]* quagga-[0-9]*
22
22
23
PKGMESSAGE=	${WRKDIR}/pkg-message
23
SUB_FILES=	pkg-message zebractl
24
SUB_FILES=	pkg-message
25
USE_SUBMAKE=	yes
24
USE_SUBMAKE=	yes
26
GNU_CONFIGURE=	yes
25
GNU_CONFIGURE=	yes
27
CONFIGURE_ARGS+=	--sysconfdir=${PREFIX}/etc/zebra
26
CONFIGURE_ARGS+=	--sysconfdir=${PREFIX}/etc/zebra
Lines 43-49 Link Here
43
MAN8=		bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
42
MAN8=		bgpd.8 ospf6d.8 ospfd.8 ripd.8 ripngd.8 zebra.8
44
INFO=		zebra
43
INFO=		zebra
45
44
46
.include <bsd.port.pre.mk>
45
.include <bsd.port.options.mk>
47
46
48
.if ${OSVERSION} >= 800059
47
.if ${OSVERSION} >= 800059
49
BROKEN=		does not build
48
BROKEN=		does not build
Lines 115-127 Link Here
115
PLIST_SUB+=	VTYSH="@comment "
114
PLIST_SUB+=	VTYSH="@comment "
116
.endif
115
.endif
117
116
117
.include <bsd.port.pre.mk>
118
118
post-install:
119
post-install:
119
	@( cd ${WRKSRC}/doc; ${RM} -f zebra*info*; ${MAKE} zebra.info install )
120
	@( cd ${WRKSRC}/doc; ${RM} -f zebra*info*; ${MAKE} zebra.info install )
120
	@${ECHO} "===>     installing zebra startup file..."
121
	@${ECHO} "===>     installing zebra startup file..."
121
	@${SED} -e "s=!!PREFIX!!=${PREFIX}=" \
122
	${INSTALL_SCRIPT} ${WRKDIR}/zebractl ${PREFIX}/sbin/zebractl
122
		< ${FILESDIR}/zebractl.sh  \
123
		> ${PREFIX}/sbin/zebractl
124
	@${CHMOD} 555 ${PREFIX}/sbin/zebractl
125
	@${ECHO} "done."
123
	@${ECHO} "done."
126
	@${CAT} ${PKGMESSAGE}
124
	@${CAT} ${PKGMESSAGE}
127
125
(-)files/zebractl.in (+57 lines)
Added Link Here
1
#! /bin/sh
2
#
3
# $FreeBSD: ports/net/zebra/files/zebractl.sh,v 1.8 2002/08/04 20:04:50 sumikawa Exp $
4
#
5
# zebra start/stop script by "Andreas Klemm <andreas@FreeBSD.ORG>"
6
#
7
8
usage()
9
{
10
	echo "$0: usage: $0 [ start | stop | restart ]"
11
	exit 1
12
}
13
14
if [ $# -lt 1 ]; then
15
	echo "$0: error: one argument needed"; usage
16
elif [ $# -gt 1 ]; then
17
	echo "$0: error: only one argument needed"; usage
18
fi
19
20
case $1 in
21
	start)
22
		if [ ! -f %%ETCDIR%%/zebra.conf ]; then
23
			echo "error: zebra.conf config file is mandatory"
24
			exit 1
25
		fi
26
		[ -f %%ETCDIR%%/zebra.conf ] \
27
			&& %%PREFIX%%/sbin/zebra -d && echo -n ' zebra'
28
		[ -f %%ETCDIR%%/ripd.conf ] \
29
			&& %%PREFIX%%/sbin/ripd -d && echo -n ' ripd'
30
		[ -f %%ETCDIR%%/ripngd.conf ] \
31
			&& %%PREFIX%%/sbin/ripngd -d && echo -n ' ripngd'
32
		[ -f %%ETCDIR%%/ospfd.conf ] \
33
			&& %%PREFIX%%/sbin/ospfd -d && echo -n ' ospfd'
34
		[ -f %%ETCDIR%%/ospf6d.conf ] \
35
			&& %%PREFIX%%/sbin/ospf6d -d && echo -n ' ospf6d'
36
		[ -f %%ETCDIR%%/bgpd.conf ] \
37
			&& %%PREFIX%%/sbin/bgpd -d && echo -n ' bgpd'
38
		;;
39
40
	stop)
41
		[ -f %%ETCDIR%%/ripd.conf ] && killall ripd
42
		[ -f %%ETCDIR%%/ripngd.conf ] && killall ripngd
43
		[ -f %%ETCDIR%%/ospfd.conf ] && killall ospfd
44
		[ -f %%ETCDIR%%/ospf6d.conf ] && killall ospf6d
45
		[ -f %%ETCDIR%%/bgpd.conf ] && killall bgpd
46
		[ -f %%ETCDIR%%/zebra.conf ] &&  killall zebra
47
		;;
48
	restart)
49
		$0 stop
50
		$0 start
51
		;;
52
53
	*)	echo "$0: error: unknown option $1"
54
		usage
55
		;;
56
esac
57
exit 0
(-)files/zebractl.sh (-57 lines)
Removed Link Here
1
#! /bin/sh
2
#
3
# $FreeBSD: ports/net/zebra/files/zebractl.sh,v 1.8 2002/08/04 20:04:50 sumikawa Exp $
4
#
5
# zebra start/stop script by "Andreas Klemm <andreas@FreeBSD.ORG>"
6
#
7
8
usage()
9
{
10
	echo "$0: usage: $0 [ start | stop | restart ]"
11
	exit 1
12
}
13
14
if [ $# -lt 1 ]; then
15
	echo "$0: error: one argument needed"; usage
16
elif [ $# -gt 1 ]; then
17
	echo "$0: error: only one argument needed"; usage
18
fi
19
20
case $1 in
21
	start)
22
		if [ ! -f !!PREFIX!!/etc/zebra/zebra.conf ]; then
23
			echo "error: zebra.conf config file is mandatory"
24
			exit 1
25
		fi
26
		[ -f !!PREFIX!!/etc/zebra/zebra.conf ] \
27
			&& !!PREFIX!!/sbin/zebra -d && echo -n ' zebra'
28
		[ -f !!PREFIX!!/etc/zebra/ripd.conf ] \
29
			&& !!PREFIX!!/sbin/ripd -d && echo -n ' ripd'
30
		[ -f !!PREFIX!!/etc/zebra/ripngd.conf ] \
31
			&& !!PREFIX!!/sbin/ripngd -d && echo -n ' ripngd'
32
		[ -f !!PREFIX!!/etc/zebra/ospfd.conf ] \
33
			&& !!PREFIX!!/sbin/ospfd -d && echo -n ' ospfd'
34
		[ -f !!PREFIX!!/etc/zebra/ospf6d.conf ] \
35
			&& !!PREFIX!!/sbin/ospf6d -d && echo -n ' ospf6d'
36
		[ -f !!PREFIX!!/etc/zebra/bgpd.conf ] \
37
			&& !!PREFIX!!/sbin/bgpd -d && echo -n ' bgpd'
38
		;;
39
40
	stop)
41
		[ -f !!PREFIX!!/etc/zebra/ripd.conf ] && killall ripd
42
		[ -f !!PREFIX!!/etc/zebra/ripngd.conf ] && killall ripngd
43
		[ -f !!PREFIX!!/etc/zebra/ospfd.conf ] && killall ospfd
44
		[ -f !!PREFIX!!/etc/zebra/ospf6d.conf ] && killall ospf6d
45
		[ -f !!PREFIX!!/etc/zebra/bgpd.conf ] && killall bgpd
46
		[ -f !!PREFIX!!/etc/zebra/zebra.conf ] &&  killall zebra
47
		;;
48
	restart)
49
		$0 stop
50
		$0 start
51
		;;
52
53
	*)	echo "$0: error: unknown option $1"
54
		usage
55
		;;
56
esac
57
exit 0

Return to bug 143155