From 5998775f9cf37cc6f4626fff14b2a3823ff1c1d1 Mon Sep 17 00:00:00 2001 From: Christof Schulze Date: Wed, 27 Apr 2016 22:58:31 +0200 Subject: [PATCH] use only one init script --- .../files/etc/init.d/gluon-mesh-babeld-1 | 37 ------------------- .../gluon/gluon-mesh-babel/mkconfig} | 2 +- 2 files changed, 1 insertion(+), 38 deletions(-) delete mode 100755 package/gluon-mesh-babel/files/etc/init.d/gluon-mesh-babeld-1 rename package/gluon-mesh-babel/files/{etc/init.d/gluon-mesh-babeld-0 => lib/gluon/gluon-mesh-babel/mkconfig} (93%) diff --git a/package/gluon-mesh-babel/files/etc/init.d/gluon-mesh-babeld-1 b/package/gluon-mesh-babel/files/etc/init.d/gluon-mesh-babeld-1 deleted file mode 100755 index 5486fcf3..00000000 --- a/package/gluon-mesh-babel/files/etc/init.d/gluon-mesh-babeld-1 +++ /dev/null @@ -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) -} diff --git a/package/gluon-mesh-babel/files/etc/init.d/gluon-mesh-babeld-0 b/package/gluon-mesh-babel/files/lib/gluon/gluon-mesh-babel/mkconfig similarity index 93% rename from package/gluon-mesh-babel/files/etc/init.d/gluon-mesh-babeld-0 rename to package/gluon-mesh-babel/files/lib/gluon/gluon-mesh-babel/mkconfig index 3161cc17..26ddf2c2 100755 --- a/package/gluon-mesh-babel/files/etc/init.d/gluon-mesh-babeld-0 +++ b/package/gluon-mesh-babel/files/lib/gluon/gluon-mesh-babel/mkconfig @@ -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")