diff options
author | andreas <andreas@FreeBSD.org> | 1999-12-24 15:56:32 +0000 |
---|---|---|
committer | andreas <andreas@FreeBSD.org> | 1999-12-24 15:56:32 +0000 |
commit | 7cc269980353ad2c71aa04a29a4653f3f10635ce (patch) | |
tree | 858c81f5095cc657aca0fcdc9c907f0f9ace320f /net/zebra-devel/files | |
parent | bf2d91f7ac44f0bba1b531e91d6f73536d0e29b2 (diff) | |
download | FreeBSD-ports-7cc269980353ad2c71aa04a29a4653f3f10635ce.zip FreeBSD-ports-7cc269980353ad2c71aa04a29a4653f3f10635ce.tar.gz |
- Upgrade to 0.83a
- remove zebra.sh from ${PREFIX}/etc/rc.d
- start zebra now from /etc/rc.conf.local
- new zebra start script is ${PREFIX}/sbin/zebractl {start|stop|restart}
Example:
/etc/rc.conf.local:
defaultrouter="NO"
router_enable="YES"
router="/usr/local/sbin/zebractl"
router_flags="start"
Diffstat (limited to 'net/zebra-devel/files')
-rw-r--r-- | net/zebra-devel/files/zebractl.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/net/zebra-devel/files/zebractl.sh b/net/zebra-devel/files/zebractl.sh new file mode 100644 index 0000000..f803003 --- /dev/null +++ b/net/zebra-devel/files/zebractl.sh @@ -0,0 +1,51 @@ +#! /bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/net/zebra-devel/files/Attic/zebractl.sh,v 1.1 1999-12-24 15:56:31 andreas Exp $ +# +# zebra start/stop script by "Andreas Klemm <andreas@FreeBSD.ORG>" +# + +usage() +{ + echo "$0: usage: $0 [ start | stop ]" + exit 1 +} + +if [ $# -lt 1 ]; then + echo "$0: error: one argument needed"; usage +elif [ $# -gt 1 ]; then + echo "$0: error: only one argument needed"; usage +fi + +case $1 in + start) + [ -f !!PREFIX!!/etc/zebra/zebra.conf ] && ( \ + !!PREFIX!!/sbin/zebra > /dev/null 2>&1 & \ + echo -n ' zebra' ) + [ -f !!PREFIX!!/etc/zebra/ripd.conf ] && ( \ + !!PREFIX!!/sbin/ripd > /dev/null 2>&1 & \ + echo -n ' ripd' ) + [ -f !!PREFIX!!/etc/zebra/ospfd.conf ] && ( \ + !!PREFIX!!/sbin/ospfd > /dev/null 2>&1 & \ + echo -n ' ospfd' ) + [ -f !!PREFIX!!/etc/zebra/bgpd.conf ] && ( \ + !!PREFIX!!/sbin/bgpd > /dev/null 2>&1 & \ + echo -n ' bgpd' ) + ;; + + stop) + [ -f !!PREFIX!!/etc/zebra/ripd.conf ] && killall ripd + [ -f !!PREFIX!!/etc/zebra/ospfd.conf ] && killall ospfd + [ -f !!PREFIX!!/etc/zebra/bgpd.conf ] && killall bgpd + [ -f !!PREFIX!!/etc/zebra/zebra.conf ] && killall zebra + ;; + restart) + $0 stop + $0 start + ;; + + *) echo "$0: error: unknown option $1" + usage + ;; +esac +exit 0 |