Author: hummen Date: Thu Oct 15 16:52:05 2009 New Revision: 1176 Log: modularized yet another trigger script and made autoupdate more verbose Modified: trunk/tools/autoupdater.sh trunk/tools/pisa_scripts.conf trunk/tools/trigger-hipupdate.sh Modified: trunk/tools/autoupdater.sh ============================================================================== --- trunk/tools/autoupdater.sh Thu Oct 15 16:38:03 2009 (r1175) +++ trunk/tools/autoupdater.sh Thu Oct 15 16:52:05 2009 (r1176) @@ -73,6 +73,8 @@ if [ ! -e "$BASE_DIR$FILE" ] then echo "get "$REMOTE_CUSTOM_DIR$FILE" "$BASE_DIR >> files_to_copy + else + echo "Local config file "$BASE_DIR$FILE" already exists. Skipping!" fi done Modified: trunk/tools/pisa_scripts.conf ============================================================================== --- trunk/tools/pisa_scripts.conf Thu Oct 15 16:38:03 2009 (r1175) +++ trunk/tools/pisa_scripts.conf Thu Oct 15 16:52:05 2009 (r1176) @@ -18,7 +18,7 @@ PISACD_CMD=$BASE_DIR"pisacd" PISABEACON_CMD=$BASE_DIR"pisabeacon" HANDOVER_CMD=$BASE_DIR"auto-handover.sh" - +MSLEEP_CMD=$BASE_DIR"msleep" ### script-specific settings @@ -36,3 +36,6 @@ # trigger-demo-update.sh GEO_URL="http://mobile-access-demo:8080/setPos/"; + +# trigger-hipupdate.sh +MSLEEP_INTERVAL=700 Modified: trunk/tools/trigger-hipupdate.sh ============================================================================== --- trunk/tools/trigger-hipupdate.sh Thu Oct 15 16:38:03 2009 (r1175) +++ trunk/tools/trigger-hipupdate.sh Thu Oct 15 16:52:05 2009 (r1176) @@ -1,17 +1,22 @@ -#! /bin/sh +#!/bin/bash -EXECUTE_PATH="./" -IFACE=wlan0 -INTERVAL=700 +# read config file +if [ ! -e "pisa_scripts.conf" ] +then + echo "ERROR: "$PWD"/pisa_scripts.conf not found!" + exit 1 +fi + +source pisa_scripts.conf # outputs the geo-id, if used in combination with pisabeacon if [ $# -eq 1 ] then - echo "new geo-id:" $1 + echo "new geo-id:" $1 fi # issue manual hip update -$EXECUTE_PATH"hipconf manual-update "$IFACE +$HIPCONF_CMD" manual-update "$WIFI_IF -$EXECUTE_PATH"usleep -i "$INTERVAL -$EXECUTE_PATH"hipconf manual-update "$IFACE +$MSLEEP_CMD" -i "$MSLEEP_INTERVAL +$HIPCONF_CMD" manual-update "$WIFI_IF