[package] fix babel init script and install it by default (#4939)
authorFlorian Fainelli <florian@openwrt.org>
Sun, 19 Apr 2009 20:32:11 +0000 (20:32 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 19 Apr 2009 20:32:11 +0000 (20:32 +0000)
SVN-Revision: 15275

ipv6/babel/Makefile
ipv6/babel/files/babel.init

index 6c37ee86fa9edbdc841005ee6a3dee7b7c013b53..69712861a76b41e39def4eddcef3a3c141c352c2 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=babel
 PKG_VERSION:=0.94
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
@@ -48,6 +48,8 @@ define Package/babel/install
        $(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))
index 5c0ad53f72e46faa5d7648e683214bb6b0153474..9e116574ad232f928aba0d93a399d8aa4e04e0f3 100755 (executable)
@@ -10,7 +10,7 @@ babel_config() {
 }
 
 start() {
-       if [ -x /etc/init.d/ahcpd ] ; then
+       if [ -x /etc/rc.d/S71ahcpd ] ; then
                echo 'Not starting babel -- will be started by ahcpd.'
                exit 0
        fi
@@ -20,7 +20,7 @@ start() {
        if [ -e $pidfile ] ; then
                echo "$pidfile exists -- not starting babel." >&2
        else
-               /usr/bin/babel -D -I $pidfile $interfaces
+               /usr/sbin/babel -D -I $pidfile $interfaces
        fi
 }
 
@@ -28,5 +28,5 @@ stop() {
        [ -e $pidfile ] && kill $(cat $pidfile)
        [ -e $pidfile ] && sleep 2
        [ -e $pidfile ] && sleep 4
-       [ -e $pidfile ] && echo "Failed to stop ahcpd ($pidfile still exists)."
+       [ -e $pidfile ] && echo "Failed to stop babel ($pidfile still exists)."
 }