diff options
Diffstat (limited to 'net-misc/quagga/files/init')
-rw-r--r-- | net-misc/quagga/files/init/bgpd | 32 | ||||
-rw-r--r-- | net-misc/quagga/files/init/ospf6d | 32 | ||||
-rw-r--r-- | net-misc/quagga/files/init/ospfd | 32 | ||||
-rw-r--r-- | net-misc/quagga/files/init/ripd | 32 | ||||
-rw-r--r-- | net-misc/quagga/files/init/ripngd | 32 | ||||
-rw-r--r-- | net-misc/quagga/files/init/zebra | 47 |
6 files changed, 207 insertions, 0 deletions
diff --git a/net-misc/quagga/files/init/bgpd b/net-misc/quagga/files/init/bgpd new file mode 100644 index 000000000000..a684202a640a --- /dev/null +++ b/net-misc/quagga/files/init/bgpd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2003 DataCore GmbH, Amir Guindehi +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/init/bgpd,v 1.1 2004/03/29 12:29:03 amir Exp $ + +depend() { + need net zebra +} + +checkconfig() { + if [ ! -e /etc/quagga/bgpd.conf ] ; then + eerror "You need to create /etc/quagga/bgpd.conf first." + eerror "An example can be found in /etc/quagga/bgpd.conf.sample" + return 1 + fi +} + +start() { + ebegin "Starting bgpd" + start-stop-daemon --start --quiet --exec /usr/sbin/bgpd \ + -- -d -f /etc/quagga/bgpd.conf \ + --pid_file /var/run/quagga/ospfd.pid + result=$? + eend $result +} + +stop() { + ebegin "Stopping bgpd" + start-stop-daemon --stop --quiet --pidfile /var/run/quagga/bgpd.pid + result=$? + eend $result +} diff --git a/net-misc/quagga/files/init/ospf6d b/net-misc/quagga/files/init/ospf6d new file mode 100644 index 000000000000..e44f941b5245 --- /dev/null +++ b/net-misc/quagga/files/init/ospf6d @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2003 DataCore GmbH, Amir Guindehi +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/init/ospf6d,v 1.1 2004/03/29 12:29:03 amir Exp $ + +depend() { + need net zebra +} + +checkconfig() { + if [ ! -e /etc/quagga/ospf6d.conf ] ; then + eerror "You need to create /etc/quagga/ospf6d.conf first." + eerror "An example can be found in /etc/quagga/ospf6d.conf.sample" + return 1 + fi +} + +start() { + ebegin "Starting ospf6d" + start-stop-daemon --start --quiet --exec /usr/sbin/ospf6d \ + -- -d -f /etc/quagga/ospf6d.conf \ + --pid_file /var/run/quagga/ospf6d.pid + result=$? + eend $result +} + +stop() { + ebegin "Stopping ospf6d" + start-stop-daemon --stop --quiet --pidfile /var/run/quagga/ospf6d.pid + result=$? + eend $result +} diff --git a/net-misc/quagga/files/init/ospfd b/net-misc/quagga/files/init/ospfd new file mode 100644 index 000000000000..4320a3dd7a5b --- /dev/null +++ b/net-misc/quagga/files/init/ospfd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2003 DataCore GmbH, Amir Guindehi +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/init/ospfd,v 1.1 2004/03/29 12:29:03 amir Exp $ + +depend() { + need net zebra +} + +checkconfig() { + if [ ! -e /etc/quagga/ospfd.conf ] ; then + eerror "You need to create /etc/quagga/ospfd.conf first." + eerror "An example can be found in /etc/quagga/ospfd.conf.sample" + return 1 + fi +} + +start() { + ebegin "Starting ospfd" + start-stop-daemon --start --quiet --exec /usr/sbin/ospfd \ + -- -d -f /etc/quagga/ospfd.conf \ + --pid_file /var/run/quagga/ospfd.pid + result=$? + eend $result +} + +stop() { + ebegin "Stopping ospfd" + start-stop-daemon --stop --quiet --pidfile /var/run/quagga/ospfd.pid + result=$? + eend $result +} diff --git a/net-misc/quagga/files/init/ripd b/net-misc/quagga/files/init/ripd new file mode 100644 index 000000000000..91b7ac896716 --- /dev/null +++ b/net-misc/quagga/files/init/ripd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2003 DataCore GmbH, Amir Guindehi +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/init/ripd,v 1.1 2004/03/29 12:29:03 amir Exp $ + +depend() { + need net zebra +} + +checkconfig() { + if [ ! -e /etc/quagga/ripd.conf ] ; then + eerror "You need to create /etc/quagga/ripd.conf first." + eerror "An example can be found in /etc/quagga/ripd.conf.sample" + return 1 + fi +} + +start() { + ebegin "Starting ripd" + start-stop-daemon --start --quiet --exec /usr/sbin/ripd \ + -- -d -f /etc/quagga/ripd.conf \ + --pid_file /var/run/quagga/ripd.pid + result=$? + eend $result +} + +stop() { + ebegin "Stopping ripd" + start-stop-daemon --stop --quiet --pidfile /var/run/quagga/ripd.pid + result=$? + eend $result +} diff --git a/net-misc/quagga/files/init/ripngd b/net-misc/quagga/files/init/ripngd new file mode 100644 index 000000000000..b0face4ccf46 --- /dev/null +++ b/net-misc/quagga/files/init/ripngd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2003 DataCore GmbH, Amir Guindehi +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/init/ripngd,v 1.1 2004/03/29 12:29:03 amir Exp $ + +depend() { + need net zebra +} + +checkconfig() { + if [ ! -e /etc/quagga/ripngd.conf ] ; then + eerror "You need to create /etc/quagga/ripngd.conf first." + eerror "An example can be found in /etc/quagga/ripngd.conf.sample" + return 1 + fi +} + +start() { + ebegin "Starting ripngd" + start-stop-daemon --start --quiet --exec /usr/sbin/ripngd \ + -- -d -f /etc/quagga/ripngd.conf \ + --pid_file /var/run/quagga/ripngd.pid + result=$? + eend $result +} + +stop() { + ebegin "Stopping ripngd" + start-stop-daemon --stop --quiet --pidfile /var/run/quagga/ripngd.pid + result=$? + eend $result +} diff --git a/net-misc/quagga/files/init/zebra b/net-misc/quagga/files/init/zebra new file mode 100644 index 000000000000..59c586d2a5cc --- /dev/null +++ b/net-misc/quagga/files/init/zebra @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/init/zebra,v 1.1 2004/03/29 12:29:03 amir Exp $ + +depend() { + need net +} + +checkconfig() { + if [ ! -e /etc/quagga/zebra.conf ] ; then + eerror "You need to create /etc/quagga/zebra.conf first." + eerror "An example can be found in /etc/quagga/zebra.conf.sample" + return 1 + fi +} + +cleanup() { + stale=`ip route | grep 'proto zebra' | awk '{ print $1 }'` + if [ ! -z "$stale" ] ; then + einfo "Cleaning up stale zebra routes..." + fi + for r in $stale; do + ebegin "Removing stale route to $r..." + ip route del $r; + eend $? + done +} + +start() { + checkconfig + cleanup + + ebegin "Starting zebra" + start-stop-daemon --start --quiet --exec /usr/sbin/zebra \ + -- -d -l 255 -f /etc/quagga/zebra.conf \ + --pid_file /var/run/quagga/zebra.pid + result=$? + eend $result +} + +stop() { + ebegin "Stopping zebra" + start-stop-daemon --stop --quiet --pidfile /var/run/quagga/zebra.pid + result=$? + eend $result +} |