[package] fix babel init script and install it by default (#4939)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@15275 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
3b0879e0e6
commit
c9d33816de
@ -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))
|
||||
|
@ -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)."
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user