summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/zebra/files/init.d/bgpd.initd42
-rw-r--r--net-misc/zebra/files/init.d/ospf6d.initd39
-rw-r--r--net-misc/zebra/files/init.d/ospfd.initd39
-rw-r--r--net-misc/zebra/files/init.d/ripd.initd40
-rw-r--r--net-misc/zebra/files/init.d/ripngd.initd41
-rw-r--r--net-misc/zebra/files/init.d/zebra.initd42
6 files changed, 243 insertions, 0 deletions
diff --git a/net-misc/zebra/files/init.d/bgpd.initd b/net-misc/zebra/files/init.d/bgpd.initd
new file mode 100644
index 000000000000..59e012687d03
--- /dev/null
+++ b/net-misc/zebra/files/init.d/bgpd.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zebra/files/init.d/bgpd.initd,v 1.1 2003/05/31 19:57:55 solar Exp $
+
+
+opts="depend checkconfig stop start"
+
+depend() {
+ need net zebra
+}
+
+checkconfig() {
+ if [ ! -e /etc/zebra/zebra.conf ]; then
+ eerror "You need to create /etc/zebra/bgpd.conf first."
+ eerror "An example can be found in /etc/zebra/sample/bgpd.conf.sample"
+ return 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping bgpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/bgpd.pid
+ result=$?
+ eend $result
+}
+
+start() {
+ local myopts="--daemon"
+
+ [ -n "${BGPD_CONFIG_FILE}" ] && myopts="${myopts} --config_file ${BGPD_CONFIG_FILE}"
+ [ -n "${BGPD_BGP_PORT}" ] && [ "${BGPD_BGP_PORT}" -ge 0 ] && myopts="${myopts} --bgp_port ${BGPD_BGP_PORT}"
+ [ -n "${BGPD_VTY_ADDR}" ] && myopts="${myopts} --vty_addr ${BGPD_VTY_ADDR}"
+ [ -n "${BGPD_VTY_PORT}" ] && [ "${BGPD_VTY_PORT}" -ge 0 ] && myopts="${myopts} --vty_port ${BGPD_VTY_PORT}"
+ [ "x${BGPD_RETAIN}" == "xyes" ] && myopts="${myopts} --retain"
+ [ "x${BGPD_NO_KERNEL}" == "xyes" ] && myopts="${myopts} --keep_kernel"
+
+ ebegin "Starting bgpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bgpd -- ${myopts}
+ result=$?
+ eend $result
+}
diff --git a/net-misc/zebra/files/init.d/ospf6d.initd b/net-misc/zebra/files/init.d/ospf6d.initd
new file mode 100644
index 000000000000..c16f8550ce2c
--- /dev/null
+++ b/net-misc/zebra/files/init.d/ospf6d.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zebra/files/init.d/ospf6d.initd,v 1.1 2003/05/31 19:57:55 solar Exp $
+
+
+opts="depend checkconfig stop start"
+
+depend() {
+ need net zebra
+}
+
+checkconfig() {
+ if [ ! -e /etc/zebra/zebra.conf ]; then
+ eerror "You need to create /etc/zebra/ospf6d.conf first."
+ eerror "An example can be found in /etc/zebra/sample/ospf6d.conf.sample"
+ return 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping ospf6d"
+ start-stop-daemon --stop --quiet --pidfile /var/run/ospf6d.pid
+ result=$?
+ eend $result
+}
+
+start() {
+ local myopts="--daemon"
+
+ [ -n "${OSPF6D_CONFIG_FILE}" ] && myopts="${myopts} --config_file ${OSPF6D_CONFIG_FILE}"
+ [ -n "${OSPF6D_VTY_ADDR}" ] && myopts="${myopts} --vty_addr ${OSPF6D_VTY_ADDR}"
+ [ -n "${OSPF6D_VTY_PORT}" ] && [ "${OSPF6D_VTY_PORT}" -ge 0 ] && myopts="${myopts} --vty_port ${OSPF6D_VTY_PORT}"
+
+ ebegin "Starting ospf6d"
+ start-stop-daemon --start --quiet --exec /usr/sbin/ospf6d -- ${myopts}
+ result=$?
+ eend $result
+}
diff --git a/net-misc/zebra/files/init.d/ospfd.initd b/net-misc/zebra/files/init.d/ospfd.initd
new file mode 100644
index 000000000000..08b3a88fc93c
--- /dev/null
+++ b/net-misc/zebra/files/init.d/ospfd.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zebra/files/init.d/ospfd.initd,v 1.1 2003/05/31 19:57:55 solar Exp $
+
+
+opts="depend checkconfig stop start"
+
+depend() {
+ need net zebra
+}
+
+checkconfig() {
+ if [ ! -e /etc/zebra/zebra.conf ]; then
+ eerror "You need to create /etc/zebra/ospfd.conf first."
+ eerror "An example can be found in /etc/zebra/sample/ospfd.conf.sample"
+ return 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping ospfd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/ospfd.pid
+ result=$?
+ eend $result
+}
+
+start() {
+ local myopts="--daemon"
+
+ [ -n "${OSPFD_CONFIG_FILE}" ] && myopts="${myopts} --config_file ${OSPFD_CONFIG_FILE}"
+ [ -n "${OSPFD_VTY_ADDR}" ] && myopts="${myopts} --vty_addr ${OSPFD_VTY_ADDR}"
+ [ -n "${OSPFD_VTY_PORT}" ] && [ "${OSPFD_VTY_PORT}" -ge 0 ] && myopts="${myopts} --vty_port ${OSPFD_VTY_PORT}"
+
+ ebegin "Starting ospfd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/ospfd -- ${myopts}
+ result=$?
+ eend $result
+}
diff --git a/net-misc/zebra/files/init.d/ripd.initd b/net-misc/zebra/files/init.d/ripd.initd
new file mode 100644
index 000000000000..c0a212a4219e
--- /dev/null
+++ b/net-misc/zebra/files/init.d/ripd.initd
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zebra/files/init.d/ripd.initd,v 1.1 2003/05/31 19:57:55 solar Exp $
+
+
+opts="depend checkconfig stop start"
+
+depend() {
+ need net zebra
+}
+
+checkconfig() {
+ if [ ! -e /etc/zebra/zebra.conf ]; then
+ eerror "You need to create /etc/zebra/ripd.conf first."
+ eerror "An example can be found in /etc/zebra/sample/ripd.conf.sample"
+ return 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping ripd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/ripd.pid
+ result=$?
+ eend $result
+}
+
+start() {
+ local myopts="--daemon"
+
+ [ -n "${RIPD_CONFIG_FILE}" ] && myopts="${myopts} --config_file ${RIPD_CONFIG_FILE}"
+ [ -n "${RIPD_VTY_ADDR}" ] && myopts="${myopts} --vty_addr ${RIPD_VTY_ADDR}"
+ [ -n "${RIPD_VTY_PORT}" ] && [ "${RIPD_VTY_PORT}" -ge 0 ] && myopts="${myopts} --vty_port ${RIPD_VTY_PORT}"
+ [ "x${RIPD_RETAIN}" == "xyes" ] && myopts="${myopts} --retain"
+
+ ebegin "Starting ripd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/ripd -- ${myopts}
+ result=$?
+ eend $result
+}
diff --git a/net-misc/zebra/files/init.d/ripngd.initd b/net-misc/zebra/files/init.d/ripngd.initd
new file mode 100644
index 000000000000..b5004639705b
--- /dev/null
+++ b/net-misc/zebra/files/init.d/ripngd.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zebra/files/init.d/ripngd.initd,v 1.1 2003/05/31 19:57:55 solar Exp $
+
+
+opts="depend checkconfig stop start"
+
+depend() {
+ need net zebra
+}
+
+checkconfig() {
+ if [ ! -e /etc/zebra/zebra.conf ]; then
+ eerror "You need to create /etc/zebra/ripngd.conf first."
+ eerror "An example can be found in /etc/zebra/sample/ripngd.conf.sample"
+ return 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping ripngd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/ripngd.pid
+ result=$?
+ eend $result
+}
+
+start() {
+ local myopts="--daemon"
+
+ [ -n "${RIPNGD_CONFIG_FILE}" ] && myopts="${myopts} --config_file ${RIPNGD_CONFIG_FILE}"
+ [ -n "${RIPNGD_LOG_MODE}" ] && [ "${RIPNGD_LOG_MODE}" -ge 0 ] && myopts="${myopts} --log_mode ${RIPNGD_LOG_MODE}"
+ [ -n "${RIPNGD_VTY_ADDR}" ] && myopts="${myopts} --vty_addr ${RIPNGD_VTY_ADDR}"
+ [ -n "${RIPNGD_VTY_PORT}" ] && [ "${RIPNGD_VTY_PORT}" -ge 0 ] && myopts="${myopts} --vty_port ${RIPNGD_VTY_PORT}"
+ [ "x${RIPNGD_RETAIN}" == "xyes" ] && myopts="${myopts} --retain"
+
+ ebegin "Starting ripngd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/ripngd -- ${myopts}
+ result=$?
+ eend $result
+}
diff --git a/net-misc/zebra/files/init.d/zebra.initd b/net-misc/zebra/files/init.d/zebra.initd
new file mode 100644
index 000000000000..927847c30f8c
--- /dev/null
+++ b/net-misc/zebra/files/init.d/zebra.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/zebra/files/init.d/zebra.initd,v 1.1 2003/05/31 19:57:55 solar Exp $
+
+
+opts="depend checkconfig stop start"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/zebra/zebra.conf ]; then
+ eerror "You need to create /etc/zebra/zebra.conf first."
+ eerror "An example can be found in /etc/zebra/sample/zebra.conf.sample"
+ return 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping zebra"
+ start-stop-daemon --stop --quiet --pidfile /var/run/zebra.pid
+ result=$?
+ eend $result
+}
+
+start() {
+ local myopts="--daemon"
+
+ [ -n "${ZEBRA_CONFIG_FILE}" ] && myopts="${myopts} --config_file ${ZEBRA_CONFIG_FILE}"
+ [ "x${ZEBRA_KEEP_KERNEL}" == "xyes" ] && myopts="${myopts} --keep_kernel"
+ [ -n "${ZEBRA_LOG_MODE}" ] && [ "${ZEBRA_LOG_MODE}" -ge 0 ] && myopts="${myopts} --log_mode ${ZEBRA_LOG_MODE}"
+ [ -n "${ZEBRA_VTY_ADDR}" ] && myopts="${myopts} --vty_addr ${ZEBRA_VTY_ADDR}"
+ [ -n "${ZEBRA_VTY_PORT}" ] && [ "${ZEBRA_VTY_PORT}" -ge 0 ] && myopts="${myopts} --vty_port ${ZEBRA_VTY_PORT}"
+ [ "x${ZEBRA_RETAIN}" == "xyes" ] && myopts="${myopts} --retain"
+
+ ebegin "Starting zebra"
+ start-stop-daemon --start --quiet --exec /usr/sbin/zebra -- ${myopts}
+ result=$?
+ eend $result
+}