Author: bertsch Date: Thu Oct 15 18:30:35 2009 New Revision: 1192 Log: Added a init script for pisabeacon. This is not yet used by the pisa openwrt package. Added: trunk/openwrt/trunk/package/pisa/files/pisabeacon.init (contents, props changed) Added: trunk/openwrt/trunk/package/pisa/files/pisabeacon.init ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/openwrt/trunk/package/pisa/files/pisabeacon.init Thu Oct 15 18:30:35 2009 (r1192) @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common +# Copyright (c) 2009, Distributed Systems Group, RWTH Aachen +# All rights reserved. + +START=66 +STOP=66 + +GEOID=$(ifconfig | grep eth1 -A 1 | grep 'inet addr' | cut -d: -f 2| cut -d" " -f 1 | cut -d. -f4) +PISABEACON_OPTS="-bd 192.168.8.255 -g "$GEOID + +test -x pisabeacon || exit 0 + +start() { + echo -n "Starting pisabeacon with geoid" $GEOID + pisabeacon $PISABEACON_OPTS > /dev/null + echo "." +} + +stop() { + echo -n "Stopping pisabeacon" + killall pisabeacon + echo "." +}