summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAndreas Klemm <andreas@FreeBSD.org>1999-12-24 15:56:32 +0000
committerAndreas Klemm <andreas@FreeBSD.org>1999-12-24 15:56:32 +0000
commit803a9168c802c3d4387fd6dfb10a8b645fbb8556 (patch)
treea948fdbf969a36f2475cdf8e57f4314ac22f3eb6 /net
parentUpgrade to GNU shtool 1.4.7 (diff)
- 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"
Notes
Notes: svn path=/head/; revision=23996
Diffstat (limited to 'net')
-rw-r--r--net/zebra-devel/Makefile13
-rw-r--r--net/zebra-devel/files/zebractl.sh51
-rw-r--r--net/zebra-devel/pkg-plist2
-rw-r--r--net/zebra-pj/Makefile13
-rw-r--r--net/zebra-pj/files/zebractl.sh51
-rw-r--r--net/zebra-pj/pkg-plist2
-rw-r--r--net/zebra/Makefile13
-rw-r--r--net/zebra/files/zebractl.sh51
-rw-r--r--net/zebra/pkg-plist2
9 files changed, 183 insertions, 15 deletions
diff --git a/net/zebra-devel/Makefile b/net/zebra-devel/Makefile
index 3aa59287408d..72b1e81ee5ed 100644
--- a/net/zebra-devel/Makefile
+++ b/net/zebra-devel/Makefile
@@ -20,9 +20,14 @@ CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc/zebra
post-install:
@${ECHO} "===> installing zebra startup file..."
@${SED} -e "s=!!PREFIX!!=${PREFIX}=" \
- < ${FILESDIR}/zebra.sh \
- > ${PREFIX}/etc/rc.d/zebra.sh
- @${CHMOD} 555 ${PREFIX}/etc/rc.d/zebra.sh
- @${ECHO} "===> done."
+ < ${FILESDIR}/zebractl.sh \
+ > ${PREFIX}/sbin/zebractl
+ @${CHMOD} 555 ${PREFIX}/sbin/zebractl
+ @${ECHO} "Make the following entries in /etc/rc.conf to start zebra:"
+ @${ECHO} "defaultrouter=\"NO\""
+ @${ECHO} "router_enable=\"YES\""
+ @${ECHO} "router=\"${PREFIX}/sbin/zebractl\""
+ @${ECHO} "router_flags=\"start\""
+ @${ECHO} "done."
.include <bsd.port.mk>
diff --git a/net/zebra-devel/files/zebractl.sh b/net/zebra-devel/files/zebractl.sh
new file mode 100644
index 000000000000..f803003408de
--- /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
diff --git a/net/zebra-devel/pkg-plist b/net/zebra-devel/pkg-plist
index 86bf18d9c2a1..51f98d1e668b 100644
--- a/net/zebra-devel/pkg-plist
+++ b/net/zebra-devel/pkg-plist
@@ -2,7 +2,7 @@ sbin/bgpd
sbin/ospfd
sbin/ripd
sbin/zebra
-etc/rc.d/zebra.sh
+sbin/zebractl
etc/zebra/bgpd.conf.sample
etc/zebra/ripd.conf.sample
etc/zebra/zebra.conf.sample
diff --git a/net/zebra-pj/Makefile b/net/zebra-pj/Makefile
index 3aa59287408d..72b1e81ee5ed 100644
--- a/net/zebra-pj/Makefile
+++ b/net/zebra-pj/Makefile
@@ -20,9 +20,14 @@ CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc/zebra
post-install:
@${ECHO} "===> installing zebra startup file..."
@${SED} -e "s=!!PREFIX!!=${PREFIX}=" \
- < ${FILESDIR}/zebra.sh \
- > ${PREFIX}/etc/rc.d/zebra.sh
- @${CHMOD} 555 ${PREFIX}/etc/rc.d/zebra.sh
- @${ECHO} "===> done."
+ < ${FILESDIR}/zebractl.sh \
+ > ${PREFIX}/sbin/zebractl
+ @${CHMOD} 555 ${PREFIX}/sbin/zebractl
+ @${ECHO} "Make the following entries in /etc/rc.conf to start zebra:"
+ @${ECHO} "defaultrouter=\"NO\""
+ @${ECHO} "router_enable=\"YES\""
+ @${ECHO} "router=\"${PREFIX}/sbin/zebractl\""
+ @${ECHO} "router_flags=\"start\""
+ @${ECHO} "done."
.include <bsd.port.mk>
diff --git a/net/zebra-pj/files/zebractl.sh b/net/zebra-pj/files/zebractl.sh
new file mode 100644
index 000000000000..7df63067bf3f
--- /dev/null
+++ b/net/zebra-pj/files/zebractl.sh
@@ -0,0 +1,51 @@
+#! /bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/net/zebra-pj/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
diff --git a/net/zebra-pj/pkg-plist b/net/zebra-pj/pkg-plist
index 86bf18d9c2a1..51f98d1e668b 100644
--- a/net/zebra-pj/pkg-plist
+++ b/net/zebra-pj/pkg-plist
@@ -2,7 +2,7 @@ sbin/bgpd
sbin/ospfd
sbin/ripd
sbin/zebra
-etc/rc.d/zebra.sh
+sbin/zebractl
etc/zebra/bgpd.conf.sample
etc/zebra/ripd.conf.sample
etc/zebra/zebra.conf.sample
diff --git a/net/zebra/Makefile b/net/zebra/Makefile
index 3aa59287408d..72b1e81ee5ed 100644
--- a/net/zebra/Makefile
+++ b/net/zebra/Makefile
@@ -20,9 +20,14 @@ CONFIGURE_ARGS+=--sysconfdir=${PREFIX}/etc/zebra
post-install:
@${ECHO} "===> installing zebra startup file..."
@${SED} -e "s=!!PREFIX!!=${PREFIX}=" \
- < ${FILESDIR}/zebra.sh \
- > ${PREFIX}/etc/rc.d/zebra.sh
- @${CHMOD} 555 ${PREFIX}/etc/rc.d/zebra.sh
- @${ECHO} "===> done."
+ < ${FILESDIR}/zebractl.sh \
+ > ${PREFIX}/sbin/zebractl
+ @${CHMOD} 555 ${PREFIX}/sbin/zebractl
+ @${ECHO} "Make the following entries in /etc/rc.conf to start zebra:"
+ @${ECHO} "defaultrouter=\"NO\""
+ @${ECHO} "router_enable=\"YES\""
+ @${ECHO} "router=\"${PREFIX}/sbin/zebractl\""
+ @${ECHO} "router_flags=\"start\""
+ @${ECHO} "done."
.include <bsd.port.mk>
diff --git a/net/zebra/files/zebractl.sh b/net/zebra/files/zebractl.sh
new file mode 100644
index 000000000000..8f62ee38eb3e
--- /dev/null
+++ b/net/zebra/files/zebractl.sh
@@ -0,0 +1,51 @@
+#! /bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/net/zebra/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
diff --git a/net/zebra/pkg-plist b/net/zebra/pkg-plist
index 86bf18d9c2a1..51f98d1e668b 100644
--- a/net/zebra/pkg-plist
+++ b/net/zebra/pkg-plist
@@ -2,7 +2,7 @@ sbin/bgpd
sbin/ospfd
sbin/ripd
sbin/zebra
-etc/rc.d/zebra.sh
+sbin/zebractl
etc/zebra/bgpd.conf.sample
etc/zebra/ripd.conf.sample
etc/zebra/zebra.conf.sample