use only one init script
This commit is contained in:
parent
4ba152e3b5
commit
5998775f9c
@ -1,37 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
. $IPKG_INSTROOT/lib/functions/network.sh
|
||||
|
||||
START=70
|
||||
|
||||
pidfile='/var/run/babeld.pid'
|
||||
CONFIGFILE='/var/etc/gluon-babel.conf'
|
||||
EXTRA_COMMANDS="status"
|
||||
EXTRA_HELP=" status Dump Babel's table to the log file."
|
||||
|
||||
start() {
|
||||
mkdir -p /var/lib
|
||||
mkdir -p /var/etc
|
||||
|
||||
/usr/sbin/babeld -D -I "$pidfile" -c "$CONFIGFILE"
|
||||
# Wait for the pidfile to appear
|
||||
for i in 1 2
|
||||
do
|
||||
[ -f "$pidfile" ] || sleep 1
|
||||
done
|
||||
[ -f "$pidfile" ] || (echo "Failed to start babeld"; exit 42)
|
||||
}
|
||||
|
||||
stop() {
|
||||
[ -f "$pidfile" ] && kill $(cat $pidfile)
|
||||
# avoid race-condition on restart: wait for
|
||||
# babeld to die for real.
|
||||
[ -f "$pidfile" ] && sleep 1
|
||||
[ -f "$pidfile" ] && sleep 1
|
||||
[ -f "$pidfile" ] && sleep 1
|
||||
[ -f "$pidfile" ] && exit 42
|
||||
}
|
||||
|
||||
status() {
|
||||
[ -f "$pidfile" ] && kill -USR1 $(cat $pidfile)
|
||||
}
|
@ -4,7 +4,7 @@ local site = require 'gluon.site_config'
|
||||
local gmesh = require 'gluon.mesh'
|
||||
|
||||
--local interfaces='/lib/gluon/core/mesh_interfaces'
|
||||
local babelconf='/var/etc/gluon-babel.conf'
|
||||
local babelconf=arg[1]
|
||||
|
||||
file = io.open(babelconf, "w")
|
||||
file:write("ipv6-subtrees true\n")
|
Loading…
Reference in New Issue
Block a user