packages/net/babel/files/babeld.init
nbd 8acbe5fbf1 Upgrade the babel package to 0.97, renaming it to babeld
- adds librt dependency to the Makefile,
- removes duplicated content from the sample babeld.conf file.

Signed-off-by: Gabriel Kerneis <kerneis@pps.jussieu.fr>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@18462 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-11-22 04:02:17 +00:00

61 lines
1.2 KiB
Bash
Executable File

#!/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)."
}