[pisa-src] r1083 - trunk/tools

  • From: René Hummen <rene.hummen@xxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Fri, 09 Oct 2009 17:59:13 +0200

Author: hummen
Date: Fri Oct  9 17:59:13 2009
New Revision: 1083

Log:
added autoupdater script to ease unified testing of the PISA functionality

Added:
   trunk/tools/autoupdater.sh   (contents, props changed)

Added: trunk/tools/autoupdater.sh
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/tools/autoupdater.sh  Fri Oct  9 17:59:13 2009        (r1083)
@@ -0,0 +1,81 @@
+#!/bin/sh
+#author: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx>
+
+# This script provides auto-update functionality for the HIPL and PISA binaries
+# as well as for the PISA config files. The files are copied into a seperate
+# directory LOCAL_DIR and should be run from there.
+
+#### CONFIG ####
+#Set your LuFG username here
+USER="root"
+SERVER="morpheus.informatik.rwth-aachen.de"
+# these need trailing /
+REMOTE_DIR=""
+REMOTE_HIPL_DIR=$REMOTE_DIR"hipl--midauth2--2.6/"
+REMOTE_PISA_DIR=$REMOTE_DIR"pisa/trunk/"
+LOCAL_DIR=$HOME"/pisa_testbed/"
+
+HIPL_FILES="hipd/hipd tools/hipconf"
+PISA_FILES="pisacd/pisacd pisasd/pisasd pisabeacon/pisabeacon tools/msleep"
+PISA_FILES=$PISA_FILES" tools/switch-ip tools/trigger-hipupdate.sh"
+
+
+#### DON'T CHANGE BELOW ####
+
+REMOTE_PATH=""
+REMOTE_FILES=""
+
+echo
+echo "autoupdater for hipl and pisa binaries/configs"
+echo
+echo "files will be placed in: "$LOCAL_DIR
+echo
+
+# Read user name if not set already
+if [ "$USER" = "" ]; then
+    echo "Enter user name for server "$SERVER":"
+    read USER
+       echo "NOTE: You can statically set the user name in this script."
+fi
+
+# Read password
+echo "Enter password for "$USER"@"$SERVER":"
+stty -echo
+read PASS
+stty echo
+
+REMOTE_PATH=$USER"@"$SERVER":"
+
+# Create required directory structure
+if [ ! -d "$LOCAL_DIR" ]; then
+       echo "Directory $LOCAL_DIR does not exist. Creating directory.";
+       mkdir $LOCAL_DIR
+fi
+
+for FILE in $HIPL_FILES
+do
+       REMOTE_FILES=$REMOTE_PATH$REMOTE_HIPL_DIR$FILE" "$REMOTE_FILES
+done
+
+for FILE in $PISA_FILES
+do
+       REMOTE_FILES=$REMOTE_PATH$REMOTE_PISA_DIR$FILE" "$REMOTE_FILES
+done
+
+# Get files
+# FIXME not sure if authentication works like this at all and even if it does,
+#       we should still use PK authentication instead
+echo $PASS | scp $REMOTE_FILES $LOCAL_DIR
+
+
+# Further instructions
+echo "done."
+echo
+echo "Make sure that you have the correct HIPL settings in 
[/usr/local]/etc/hosts and \
+[/usr/local]/etc/hip/hosts. Also ensure your PISA setting in 
"$LOCAL_DIR"pisacd.conf \
+correspond to your needs."
+echo
+echo "Then run the following commands:"
+echo "1.) HIPL:" $LOCAL_DIR"hipd/hipd -k"
+echo "2.1) PISA Client:" $LOCAL_DIR"pisacd -f "$LOCAL_DIR"pisacd.conf"
+echo "2.2) PISA Server:" $LOCAL_DIR"pisasd"

Other related posts:

  • » [pisa-src] r1083 - trunk/tools - René Hummen