move babel from ipv6 to net - it supports ipv4 as well
authorFelix Fietkau <nbd@openwrt.org>
Sat, 15 Aug 2009 14:06:54 +0000 (14:06 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 15 Aug 2009 14:06:54 +0000 (14:06 +0000)
SVN-Revision: 17270

ipv6/babel/Makefile [deleted file]
ipv6/babel/files/babel.conf [deleted file]
ipv6/babel/files/babel.config [deleted file]
ipv6/babel/files/babel.init [deleted file]
net/babel/Makefile [new file with mode: 0644]
net/babel/files/babel.conf [new file with mode: 0644]
net/babel/files/babel.config [new file with mode: 0644]
net/babel/files/babel.init [new file with mode: 0755]

diff --git a/ipv6/babel/Makefile b/ipv6/babel/Makefile
deleted file mode 100644 (file)
index 9bfa442..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright (C) 2007-2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=babel
-PKG_VERSION:=0.95
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
-PKG_MD5SUM:=942094c35acf850235d60831bb0dca38
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/babel
-  SECTION:=ipv6
-  CATEGORY:=IPv6
-  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
- 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.
- While it is optimised for wireless mesh networks, Babel will also work
- efficiently on wired networks. It will generate between 1.2 and 2.4 times
- the amount of routing traffic that RIPng would generate, while
- never counting to infinity.
-endef
-
-define Package/babel/conffiles
-/etc/babel.conf
-endef
-
-MAKE_FLAGS += \
-       CC="$(TARGET_CC)" \
-       CFLAGS="$(TARGET_CFLAGS)" \
-
-define Package/babel/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/babel $(1)/usr/sbin/
-       $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) ./files/babel.conf $(1)/etc/
-       $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/babel.init $(1)/etc/init.d/babel
-endef
-
-$(eval $(call BuildPackage,babel))
diff --git a/ipv6/babel/files/babel.conf b/ipv6/babel/files/babel.conf
deleted file mode 100644 (file)
index 20ba36c..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# babel config file
-# Copyright (C) 2008 Juliusz Chroboczek, L. Aaron Kaplan
-#   <jch@pps.jussieu.fr> , <aaron@lo-res.org>
-#
-# 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
-#   <jch@pps.jussieu.fr> , <aaron@lo-res.org>
-#
-# 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 (file)
index 3dee28c..0000000
+++ /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 (executable)
index 9e11657..0000000
+++ /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/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/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 babel ($pidfile still exists)."
-}
diff --git a/net/babel/Makefile b/net/babel/Makefile
new file mode 100644 (file)
index 0000000..51db689
--- /dev/null
@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2007-2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=babel
+PKG_VERSION:=0.95
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
+PKG_MD5SUM:=942094c35acf850235d60831bb0dca38
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/babel
+  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
+ 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.
+ While it is optimised for wireless mesh networks, Babel will also work
+ efficiently on wired networks. It will generate between 1.2 and 2.4 times
+ the amount of routing traffic that RIPng would generate, while
+ never counting to infinity.
+endef
+
+define Package/babel/conffiles
+/etc/babel.conf
+endef
+
+MAKE_FLAGS += \
+       CC="$(TARGET_CC)" \
+       CFLAGS="$(TARGET_CFLAGS)" \
+
+define Package/babel/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/babel $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_CONF) ./files/babel.conf $(1)/etc/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/babel.init $(1)/etc/init.d/babel
+endef
+
+$(eval $(call BuildPackage,babel))
diff --git a/net/babel/files/babel.conf b/net/babel/files/babel.conf
new file mode 100644 (file)
index 0000000..20ba36c
--- /dev/null
@@ -0,0 +1,56 @@
+# babel config file
+# Copyright (C) 2008 Juliusz Chroboczek, L. Aaron Kaplan
+#   <jch@pps.jussieu.fr> , <aaron@lo-res.org>
+#
+# 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
+#   <jch@pps.jussieu.fr> , <aaron@lo-res.org>
+#
+# 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/net/babel/files/babel.config b/net/babel/files/babel.config
new file mode 100644 (file)
index 0000000..3dee28c
--- /dev/null
@@ -0,0 +1,2 @@
+config babel
+       option interfaces "wl0"
diff --git a/net/babel/files/babel.init b/net/babel/files/babel.init
new file mode 100755 (executable)
index 0000000..9e11657
--- /dev/null
@@ -0,0 +1,32 @@
+#!/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/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/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 babel ($pidfile still exists)."
+}