Upgrade babel to 0.13 (#3480) (#3478)
authorFlorian Fainelli <florian@openwrt.org>
Thu, 29 May 2008 20:58:34 +0000 (20:58 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 29 May 2008 20:58:34 +0000 (20:58 +0000)
SVN-Revision: 11292

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

index 26b9b6a3ba683b9ef5f00926bc936f094f06e53d..8621606dd5aae9da368fa958f4cb3af24a12e8d7 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=babel
-PKG_VERSION:=0.12
+PKG_VERSION:=0.13
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
-PKG_MD5SUM:=33a4f783ae7b6ed25668473ee9771297
+PKG_MD5SUM:=9ecf19b53ba62baa2c4adcc6125f379e
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/ipv6/babel/files/babel.config b/ipv6/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/ipv6/babel/files/babel.init b/ipv6/babel/files/babel.init
new file mode 100755 (executable)
index 0000000..5c0ad53
--- /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/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)."
+}