From: Felix Fietkau Date: Sun, 22 Nov 2009 04:06:35 +0000 (+0000) Subject: merge babeld from packages to packages_8.09 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=51839074e184caac414be2e1d4ef683ea6aff038 merge babeld from packages to packages_8.09 SVN-Revision: 18463 --- diff --git a/ipv6/babel/Makefile b/ipv6/babel/Makefile index 75043b8ea0..cd41b9ca27 100644 --- a/ipv6/babel/Makefile +++ b/ipv6/babel/Makefile @@ -1,32 +1,31 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # -# $Id$ include $(TOPDIR)/rules.mk -PKG_NAME:=babel -PKG_VERSION:=0.16 +PKG_NAME:=babeld +PKG_VERSION:=0.97 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/ -PKG_MD5SUM:=8a88f75b722af663bcb9f2daedc74f46 +PKG_MD5SUM:=be0748c382dfe60bd35aa6b661e6077d include $(INCLUDE_DIR)/package.mk -define Package/babel - SECTION:=ipv6 - CATEGORY:=IPv6 +define Package/babeld + SECTION:=net + CATEGORY:=Network TITLE:=A loop-free distance-vector routing protocol URL:=http://www.pps.jussieu.fr/~jch/software/babel/ DEPENDS:=+kmod-ipv6 endef -define Package/babel/description +define Package/babeld/description Babel is a loop-avoiding distance-vector routing protocol roughly based on DSDV and AODV, but with provisions for link cost estimation and redistribution of routes from other routing protocols. @@ -36,19 +35,23 @@ define Package/babel/description never counting to infinity. endef -define Package/babel/conffiles -/etc/babel.conf +define Package/babeld/conffiles +/etc/babeld.conf endef MAKE_FLAGS += \ CC="$(TARGET_CC)" \ CFLAGS="$(TARGET_CFLAGS)" \ -define Package/babel/install +define Package/babeld/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/babel $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/babeld $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/babel.conf $(1)/etc/ + $(INSTALL_CONF) ./files/babeld.conf $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/babeld.config $(1)/etc/config/babeld + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/babeld.init $(1)/etc/init.d/babeld endef -$(eval $(call BuildPackage,babel)) +$(eval $(call BuildPackage,babeld)) diff --git a/ipv6/babel/files/babel.conf b/ipv6/babel/files/babel.conf deleted file mode 100644 index 20ba36c5f3..0000000000 --- a/ipv6/babel/files/babel.conf +++ /dev/null @@ -1,56 +0,0 @@ -# babel config file -# Copyright (C) 2008 Juliusz Chroboczek, L. Aaron Kaplan -# , -# -# This config file simply docuements sample entries. -# "redistribute" means: redistribute routes from other -# routing protocols into babel. "local" means addresses assigned to local interfaces. -# -# the default rules are: -# -## redistribute local -## redistribute deny -# -# this says, redistribute local addresses but no other routes - - - -# redistribute IPv4 default route into babel -## redistribute local 0.0.0.0/0 le 0 metric 128 - -# same but for IPv6 -## redistribute local ::/0 le 0 metric 128 - -# don't redistribute all local addresses, only selected ones -# after the first line, the "deny" rules kicks in. After the "deny" -# no redistribute local rules are going to match -## redistribute local ip 192.160.4.0/24 -## redistribute local deny -# babel config file -# Copyright (C) 2008 Juliusz Chroboczek, L. Aaron Kaplan -# , -# -# This config file simply docuements sample entries. -# "redistribute" means: redistribute routes from other -# routing protocols into babel. "local" means addresses assigned to local interfaces. -# -# the default rules are: -# -## redistribute local -## redistribute deny -# -# this says, redistribute local addresses but no other routes - - - -# redistribute IPv4 default route into babel -## redistribute local 0.0.0.0/0 le 0 metric 128 - -# same but for IPv6 -## redistribute local ::/0 le 0 metric 128 - -# don't redistribute all local addresses, only selected ones -# after the first line, the "deny" rules kicks in. After the "deny" -# no redistribute local rules are going to match -## redistribute local ip 192.160.4.0/24 -## redistribute local deny diff --git a/ipv6/babel/files/babel.config b/ipv6/babel/files/babel.config deleted file mode 100644 index 3dee28c371..0000000000 --- a/ipv6/babel/files/babel.config +++ /dev/null @@ -1,2 +0,0 @@ -config babel - option interfaces "wl0" diff --git a/ipv6/babel/files/babel.init b/ipv6/babel/files/babel.init deleted file mode 100755 index 5c0ad53f72..0000000000 --- a/ipv6/babel/files/babel.init +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=70 - -pidfile=/var/run/babel.pid - -babel_config() { - local cfg="$1" - config_get interfaces "$cfg" interfaces -} - -start() { - if [ -x /etc/init.d/ahcpd ] ; then - echo 'Not starting babel -- will be started by ahcpd.' - exit 0 - fi - config_load babel - config_foreach babel_config babel - mkdir -p /var/lib - if [ -e $pidfile ] ; then - echo "$pidfile exists -- not starting babel." >&2 - else - /usr/bin/babel -D -I $pidfile $interfaces - fi -} - -stop() { - [ -e $pidfile ] && kill $(cat $pidfile) - [ -e $pidfile ] && sleep 2 - [ -e $pidfile ] && sleep 4 - [ -e $pidfile ] && echo "Failed to stop ahcpd ($pidfile still exists)." -} diff --git a/ipv6/babel/files/babeld.conf b/ipv6/babel/files/babeld.conf new file mode 100644 index 0000000000..07fcbe122a --- /dev/null +++ b/ipv6/babel/files/babeld.conf @@ -0,0 +1,28 @@ +# babel config file +# Copyright (C) 2008 Juliusz Chroboczek, L. Aaron Kaplan +# , +# +# This config file simply documents sample entries. +# "redistribute" means: redistribute routes from other +# routing protocols into babel. "local" means addresses assigned to local interfaces. +# +# the default rules are: +# +## redistribute local +## redistribute deny +# +# this says, redistribute local addresses but no other routes + + + +# redistribute IPv4 default route into babel +## redistribute local ip 0.0.0.0/0 le 0 metric 128 + +# same but for IPv6 +## redistribute local ip ::/0 le 0 metric 128 + +# don't redistribute all local addresses, only selected ones +# after the first line, the "deny" rules kicks in. After the "deny" +# no redistribute local rules are going to match +## redistribute local ip 192.160.4.0/24 +## redistribute local deny diff --git a/ipv6/babel/files/babeld.config b/ipv6/babel/files/babeld.config new file mode 100644 index 0000000000..b512c3a20f --- /dev/null +++ b/ipv6/babel/files/babeld.config @@ -0,0 +1,2 @@ +config babeld + option interfaces "wl0" diff --git a/ipv6/babel/files/babeld.init b/ipv6/babel/files/babeld.init new file mode 100755 index 0000000000..6d0eb192d1 --- /dev/null +++ b/ipv6/babel/files/babeld.init @@ -0,0 +1,60 @@ +#!/bin/sh /etc/rc.common + +START=70 + +pidfile=/var/run/babeld.pid + +babeld_config() { + local cfg="$1" + config_get interfaces "$cfg" interfaces +} + +start() { + config_load babeld + config_foreach babeld_config babeld + mkdir -p /var/lib + if [ -e $pidfile ] ; then + echo "$pidfile exists -- not starting babel." >&2 + else + /usr/sbin/babeld -D -I $pidfile $interfaces + fi +} + +stop() { + [ -e $pidfile ] && kill $(cat $pidfile) + [ -e $pidfile ] && sleep 2 + [ -e $pidfile ] && sleep 4 + [ -e $pidfile ] && echo "Failed to stop babel ($pidfile still exists)." +} +#!/bin/sh /etc/rc.common + +START=70 + +pidfile=/var/run/babeld.pid + +babel_config() { + local cfg="$1" + config_get interfaces "$cfg" interfaces +} + +start() { + if [ -x /etc/rc.d/S71ahcpd ] ; then + echo 'Not starting babel -- will be started by ahcpd.' + exit 0 + fi + config_load babel + config_foreach babel_config babel + mkdir -p /var/lib + if [ -e $pidfile ] ; then + echo "$pidfile exists -- not starting babel." >&2 + else + /usr/sbin/babeld -D -I $pidfile $interfaces + fi +} + +stop() { + [ -e $pidfile ] && kill $(cat $pidfile) + [ -e $pidfile ] && sleep 2 + [ -e $pidfile ] && sleep 4 + [ -e $pidfile ] && echo "Failed to stop babel ($pidfile still exists)." +}