summaryrefslogtreecommitdiffstats
path: root/main/quagga
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/quagga
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/quagga')
-rw-r--r--main/quagga/APKBUILD79
-rw-r--r--main/quagga/bgpd.initd33
-rw-r--r--main/quagga/ospf6d.initd33
-rw-r--r--main/quagga/ospfd.initd33
-rw-r--r--main/quagga/quagga-0.99.11-del-routes.patch44
-rw-r--r--main/quagga/quagga-0.99.11-fd-leak.patch19
-rw-r--r--main/quagga/quagga-0.99.11-ipv6-only.patch29
-rw-r--r--main/quagga/quagga-0.99.11-link-libcap.patch24
-rw-r--r--main/quagga/quagga-0.99.11-zombie.patch29
-rw-r--r--main/quagga/quagga.post-install6
-rw-r--r--main/quagga/quagga.pre-install6
-rw-r--r--main/quagga/ripd.initd33
-rw-r--r--main/quagga/ripngd.initd33
-rw-r--r--main/quagga/zebra.confd7
-rw-r--r--main/quagga/zebra.initd41
15 files changed, 449 insertions, 0 deletions
diff --git a/main/quagga/APKBUILD b/main/quagga/APKBUILD
new file mode 100644
index 000000000..aaa3fc64d
--- /dev/null
+++ b/main/quagga/APKBUILD
@@ -0,0 +1,79 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=quagga
+pkgver=0.99.13
+pkgrel=0
+pkgdesc="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP."
+url="http://quagga.net/"
+license="GPL-2"
+depends="iproute2"
+makedepends="readline-dev ncurses-dev gawk
+ autoconf automake libtool"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://www.quagga.net/download/$pkgname-$pkgver.tar.gz
+ $pkgname-0.99.11-link-libcap.patch
+ $pkgname-0.99.11-ipv6-only.patch
+ $pkgname-0.99.11-del-routes.patch
+ $pkgname-0.99.11-zombie.patch
+ $pkgname-0.99.11-fd-leak.patch
+ bgpd.initd
+ ospf6d.initd
+ ospfd.initd
+ ripd.initd
+ ripngd.initd
+ zebra.initd
+ zebra.confd
+ $install
+ "
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -p1 < $i || return 1
+ done
+
+ msg "Running autotools..."
+ aclocal || return 1
+ autoconf || return 1
+ automake || return 1
+ libtoolize || return 1
+
+ ./configure --prefix=/usr \
+ --disable-static \
+ --enable-ipv6 \
+ --enable-ospf6d \
+ --enable-rtadv \
+ --enable-user=quagga \
+ --enable-group=quagga \
+ --enable-vty-group=quagga \
+ --enable-vtysh \
+ --sysconfdir=/etc/quagga \
+ --enable-exampledir=/usr/share/doc/quagga/ \
+ --localstatedir=/var/run/quagga \
+ || return 1
+
+ make || return 1
+ make DESTDIR="$pkgdir" install
+
+ install -d "$pkgdir"/var/run/quagga
+ for i in zebra ripd ospfd bgpd ripngd ospf6d; do
+ install -Dm755 "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i
+ done
+ install -Dm644 "$srcdir/zebra.confd" "$pkgdir"/etc/conf.d/zebra
+}
+md5sums="55a7d2dcf016580a7c7412b3518cd942 quagga-0.99.13.tar.gz
+8f99d41a8ed79e51704e8f655d255f29 quagga-0.99.11-link-libcap.patch
+44c517e988273e0e5076d24f3959a125 quagga-0.99.11-ipv6-only.patch
+1cbcf60a637b2577dee4d6df711e1247 quagga-0.99.11-del-routes.patch
+ce345725f2e7240cebe0fd5ac2b2fc48 quagga-0.99.11-zombie.patch
+e2391e19b542ec1743776ca9e36ac11a quagga-0.99.11-fd-leak.patch
+cc109a746273bc0d6aee9d758e7524ab bgpd.initd
+44547b687343ebfed7524cebc5626067 ospf6d.initd
+89b0cf4e70172bfcd195b2869cae28da ospfd.initd
+39b8cb21b55de53af38c94c2f5d85917 ripd.initd
+120ab1b53975ec86e78266f31e935ab6 ripngd.initd
+3490a10510e416ab83d5b4d767136de8 zebra.initd
+c38e884372406e9e59616e436cd26388 zebra.confd
+44b4c3684e4c7300665bf90fa4520af9 quagga.pre-install
+d2181a6401280478b8700cfcee32794e quagga.post-install"
diff --git a/main/quagga/bgpd.initd b/main/quagga/bgpd.initd
new file mode 100644
index 000000000..b6104235c
--- /dev/null
+++ b/main/quagga/bgpd.initd
@@ -0,0 +1,33 @@
+#!/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/bgpd.init,v 1.1 2005/09/14 11:11:08 mrness 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/samples/bgpd.conf.sample"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting bgpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bgpd \
+ -- -d -f /etc/quagga/bgpd.conf \
+ --pid_file /var/run/quagga/bgpd.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/main/quagga/ospf6d.initd b/main/quagga/ospf6d.initd
new file mode 100644
index 000000000..6edafe5f7
--- /dev/null
+++ b/main/quagga/ospf6d.initd
@@ -0,0 +1,33 @@
+#!/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/ospf6d.init,v 1.1 2005/09/14 11:11:08 mrness 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/samples/ospf6d.conf.sample"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ 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/main/quagga/ospfd.initd b/main/quagga/ospfd.initd
new file mode 100644
index 000000000..f67ca2c15
--- /dev/null
+++ b/main/quagga/ospfd.initd
@@ -0,0 +1,33 @@
+#!/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/ospfd.init,v 1.1 2005/09/14 11:11:08 mrness 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/samples/ospfd.conf.sample"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ 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/main/quagga/quagga-0.99.11-del-routes.patch b/main/quagga/quagga-0.99.11-del-routes.patch
new file mode 100644
index 000000000..72ee89929
--- /dev/null
+++ b/main/quagga/quagga-0.99.11-del-routes.patch
@@ -0,0 +1,44 @@
+From http://lists.quagga.net/pipermail/quagga-dev/2009-January/006362.html
+
+If there are two paralell PtP links to the same router:
+ C * 192.168.101.112/32 is directly connected, p1-4-19-4-20
+ C>* 192.168.101.112/32 is directly connected, p1-4-17-4-18
+and the cable is to one of the ppp links is pulled, Zebra
+deletes both routes instead of just the one that got yanked.
+This fixes it to only delete the route to the interface that
+got yanked.
+---
+This fix was suggested by lsorense at csclub.uwaterloo.ca (Lennart Sorensen)
+who had a similar problem. See [quagga-dev 6355]
+
+ zebra/zebra_rib.c | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
+index 90db932..7a37387 100644
+--- a/zebra/zebra_rib.c
++++ b/zebra/zebra_rib.c
+@@ -1896,6 +1896,13 @@ rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p,
+ inet_ntoa (*gate),
+ ifindex);
+
++ if (IS_ZEBRA_DEBUG_KERNEL && !gate)
++ zlog_debug ("rib_delete_ipv4(): route delete %s/%d directly, %s ifindex %d",
++ inet_ntop (AF_INET, &p->prefix, buf1, BUFSIZ),
++ p->prefixlen,
++ ifindex2ifname(ifindex),
++ ifindex);
++
+ /* Lookup route node. */
+ rn = route_node_lookup (table, (struct prefix *) p);
+ if (! rn)
+@@ -1942,7 +1949,7 @@ rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p,
+ break;
+ }
+ /* Make sure that the route found has the same gateway. */
+- else if (gate == NULL ||
++ else if (gate != NULL &&
+ ((nexthop = rib->nexthop) &&
+ (IPV4_ADDR_SAME (&nexthop->gate.ipv4, gate) ||
+ IPV4_ADDR_SAME (&nexthop->rgate.ipv4, gate))))
+
diff --git a/main/quagga/quagga-0.99.11-fd-leak.patch b/main/quagga/quagga-0.99.11-fd-leak.patch
new file mode 100644
index 000000000..e558d30a6
--- /dev/null
+++ b/main/quagga/quagga-0.99.11-fd-leak.patch
@@ -0,0 +1,19 @@
+--- quagga-0.99.11.DIST/bgpd/bgp_fsm.c 2008-09-09 16:18:57.000000000 -0400
++++ quagga-0.99.11/bgpd/bgp_fsm.c 2009-04-13 13:09:25.000000000 -0400
+@@ -1013,11 +1013,11 @@
+ {
+ /* Clearing, */
+ {bgp_ignore, Clearing}, /* BGP_Start */
+- {bgp_ignore, Clearing}, /* BGP_Stop */
+- {bgp_ignore, Clearing}, /* TCP_connection_open */
+- {bgp_ignore, Clearing}, /* TCP_connection_closed */
+- {bgp_ignore, Clearing}, /* TCP_connection_open_failed */
+- {bgp_ignore, Clearing}, /* TCP_fatal_error */
++ {bgp_stop, Clearing}, /* BGP_Stop */
++ {bgp_stop, Clearing}, /* TCP_connection_open */
++ {bgp_stop, Clearing}, /* TCP_connection_closed */
++ {bgp_stop, Clearing}, /* TCP_connection_open_failed */
++ {bgp_stop, Clearing}, /* TCP_fatal_error */
+ {bgp_ignore, Clearing}, /* ConnectRetry_timer_expired */
+ {bgp_ignore, Clearing}, /* Hold_Timer_expired */
+ {bgp_ignore, Clearing}, /* KeepAlive_timer_expired */
diff --git a/main/quagga/quagga-0.99.11-ipv6-only.patch b/main/quagga/quagga-0.99.11-ipv6-only.patch
new file mode 100644
index 000000000..53636d6b5
--- /dev/null
+++ b/main/quagga/quagga-0.99.11-ipv6-only.patch
@@ -0,0 +1,29 @@
+On Linux the default behaviour of getaddrinfo is to provide both IPV4 and IPV6
+addresses if available. But the default behaviour of binding to an IPV6 address
+is to handle both the native IPV6 address and IPV4 to IPV6 mapped addresses.
+Without this patch what happens is:
+ 1. First address is IPV6, bind succeeds.
+ 2. Second address is IPV4, bind fails (port already used by IPV6)
+ 3. incoming connections come in on IPV6 listen socket, as IPV4 mapped
+ addresses then BGP gets confused because of client with unexpected address.
+
+The fix is to force IPV6 socket as IPV6 only.
+
+--- a/bgpd/bgp_network.c 2008-08-27 17:59:20.000000000 -0700
++++ b/bgpd/bgp_network.c 2008-08-27 18:02:46.000000000 -0700
+@@ -412,6 +412,15 @@ bgp_socket (struct bgp *bgp, unsigned sh
+ setsockopt_ipv4_tos (sock, IPTOS_PREC_INTERNETCONTROL);
+ #endif
+
++#ifdef IPV6_V6ONLY
++ /* Want only IPV6 on ipv6 socket (not mapped addresses) */
++ if (ainfo->ai_family == AF_INET6) {
++ int on = 1;
++ setsockopt (sock, IPPROTO_IPV6, IPV6_V6ONLY,
++ (void *) &on, sizeof (on));
++ }
++#endif
++
+ if (bgpd_privs.change (ZPRIVS_RAISE) )
+ zlog_err ("bgp_socket: could not raise privs");
+
diff --git a/main/quagga/quagga-0.99.11-link-libcap.patch b/main/quagga/quagga-0.99.11-link-libcap.patch
new file mode 100644
index 000000000..2c1b868d1
--- /dev/null
+++ b/main/quagga/quagga-0.99.11-link-libcap.patch
@@ -0,0 +1,24 @@
+diff -ur quagga-0.99.11.orig/lib/Makefile.am quagga-0.99.11/lib/Makefile.am
+--- quagga-0.99.11.orig/lib/Makefile.am 2008-09-24 15:22:43.000000000 +0000
++++ quagga-0.99.11/lib/Makefile.am 2008-10-09 20:29:17.000000000 +0000
+@@ -18,7 +18,7 @@
+
+ libzebra_la_DEPENDENCIES = @LIB_REGEX@
+
+-libzebra_la_LIBADD = @LIB_REGEX@
++libzebra_la_LIBADD = @LIB_REGEX@ @LIBCAP@
+
+ pkginclude_HEADERS = \
+ buffer.h checksum.h command.h filter.h getopt.h hash.h \
+diff -ur quagga-0.99.11.orig/zebra/Makefile.am quagga-0.99.11/zebra/Makefile.am
+--- quagga-0.99.11.orig/zebra/Makefile.am 2008-09-05 14:27:26.000000000 +0000
++++ quagga-0.99.11/zebra/Makefile.am 2008-10-09 20:29:17.000000000 +0000
+@@ -39,7 +39,7 @@
+ connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \
+ interface.h ipforward.h irdp.h router-id.h kernel_socket.h
+
+-zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
++zebra_LDADD = $(otherobj) ../lib/libzebra.la $(LIBCAP) $(LIB_IPV6)
+
+ testzebra_LDADD = $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
+
diff --git a/main/quagga/quagga-0.99.11-zombie.patch b/main/quagga/quagga-0.99.11-zombie.patch
new file mode 100644
index 000000000..ad562df00
--- /dev/null
+++ b/main/quagga/quagga-0.99.11-zombie.patch
@@ -0,0 +1,29 @@
+
+Currently, when accepting the connection, it can be left as zombie,
+when the peer just initiates a connection, but never sends data (and
+the TCP connection end packets are lost). This happens because for
+accepted connections a temporary new peer entry is created until OPEN
+message is exchanged, and this temporary peer entry does not get the
+hold time parameter set at all.
+
+Signed-off-by: Timo Teras <timo.teras@iki.fi>
+---
+ bgpd/bgp_network.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
+index 5dbd487..9a4c36d 100644
+--- a/bgpd/bgp_network.c
++++ b/bgpd/bgp_network.c
+@@ -185,6 +185,8 @@ bgp_accept (struct thread *thread)
+ peer->fd = bgp_sock;
+ peer->status = Active;
+ peer->local_id = peer1->local_id;
++ peer->v_holdtime = peer1->v_holdtime;
++ peer->v_keepalive = peer1->v_keepalive;
+
+ /* Make peer's address string. */
+ sockunion2str (&su, buf, SU_ADDRSTRLEN);
+--
+1.5.6.3
+
diff --git a/main/quagga/quagga.post-install b/main/quagga/quagga.post-install
new file mode 100644
index 000000000..c1c670d20
--- /dev/null
+++ b/main/quagga/quagga.post-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+chown root:root var/empty
+chown quagga:quagga /var/run/quagga
+exit 0
+
diff --git a/main/quagga/quagga.pre-install b/main/quagga/quagga.pre-install
new file mode 100644
index 000000000..2643891dc
--- /dev/null
+++ b/main/quagga/quagga.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+adduser -H -h /var/empty -s /bin/false -D quagga 2>/dev/null
+mkdir -p var/empty
+exit 0
+
diff --git a/main/quagga/ripd.initd b/main/quagga/ripd.initd
new file mode 100644
index 000000000..987d6ec4b
--- /dev/null
+++ b/main/quagga/ripd.initd
@@ -0,0 +1,33 @@
+#!/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/ripd.init,v 1.1 2005/09/14 11:11:08 mrness 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/samples/ripd.conf.sample"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ 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/main/quagga/ripngd.initd b/main/quagga/ripngd.initd
new file mode 100644
index 000000000..9bf2ff2a8
--- /dev/null
+++ b/main/quagga/ripngd.initd
@@ -0,0 +1,33 @@
+#!/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/ripngd.init,v 1.1 2005/09/14 11:11:08 mrness 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/samples/ripngd.conf.sample"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ 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/main/quagga/zebra.confd b/main/quagga/zebra.confd
new file mode 100644
index 000000000..a5256acd0
--- /dev/null
+++ b/main/quagga/zebra.confd
@@ -0,0 +1,7 @@
+# Additional command-line parameters to run zebra with:
+# -k, --keep_kernel Don't delete old routes which installed by zebra.
+# -l, --log_mode number Set verbose log mode flag
+# -A, --vty_addr addr Set vty's bind address
+# -P, --vty_port port Set vty's port number
+# -r, --retain When program terminates, retain added route by zebra.
+ZEBRA_OPTS="-l 255"
diff --git a/main/quagga/zebra.initd b/main/quagga/zebra.initd
new file mode 100644
index 000000000..f0cc00843
--- /dev/null
+++ b/main/quagga/zebra.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/zebra.init,v 1.2 2007/02/25 09:57:18 mrness 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/samples/zebra.conf.sample"
+ return 1
+ fi
+}
+
+cleanup() {
+ ebegin "Cleaning up stale zebra routes..."
+ /usr/sbin/ip route flush proto zebra
+ eend $?
+}
+
+start() {
+ checkconfig || return 1
+ cleanup
+
+ ebegin "Starting zebra"
+ start-stop-daemon --start --quiet --exec /usr/sbin/zebra \
+ -- -d -f /etc/quagga/zebra.conf ${ZEBRA_OPTS} \
+ --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
+}