[Swift-commit] r5696 - trunk/bin

jonmon at ci.uchicago.edu jonmon at ci.uchicago.edu
Wed Feb 29 11:29:27 CST 2012


Author: jonmon
Date: 2012-02-29 11:29:26 -0600 (Wed, 29 Feb 2012)
New Revision: 5696

Modified:
   trunk/bin/start-coaster-service
Log:
o allow the user to specify the coaster-service.conf file on the commandline of start-coaster-service.
  command line flag is "-conf <conf.file>"


Modified: trunk/bin/start-coaster-service
===================================================================
--- trunk/bin/start-coaster-service	2012-02-28 02:12:27 UTC (rev 5695)
+++ trunk/bin/start-coaster-service	2012-02-29 17:29:26 UTC (rev 5696)
@@ -76,7 +76,7 @@
          ssh $WORKER_USERNAME@$MACHINE "$WORKER_LOCATION/$WORKER $EXECUTION_URL $MACHINE $LOG_DIR" &
          echo $! >> $PID_FILE
       fi
-      
+
    done
 }
 
@@ -143,7 +143,7 @@
       crash "SWIFTVMBOOT_DIR incorrectly defined in coaster-service.conf"
    fi
 
-   export EC2_HOME="$SWIFTVMBOOT_DIR/ec2" 
+   export EC2_HOME="$SWIFTVMBOOT_DIR/ec2"
    export EC2_PRIVATE_KEY="$EC2_KEYFILE"
    export EC2_CERT="$EC2_CERTFILE"
 
@@ -284,6 +284,13 @@
   return 0
 }
 
+while [ $# -gt 0 ]; do
+   case $1 in
+      -conf) CMDLN_CONF=$2; shift 2;;
+      *) echo "Do not recognize command line option: $1" 1>&2; exit 1;;
+   esac
+done
+
 if [ ! -d "$HOME/.swift" ]; then
    mkdir -p "$HOME/.swift" || crash "Unable to create $HOME/.swift"
 fi
@@ -292,7 +299,9 @@
 RUN_DIR=`pwd`
 
 # Import settings
-if [ -f "$RUN_DIR/coaster-service.conf" ]; then
+if [ -f "$CMDLN_CONF" ]; then
+   CONFIG_FILE=$CMDLN_CONF
+elif [ -f "$RUN_DIR/coaster-service.conf" ]; then
    CONFIG_FILE="$RUN_DIR/coaster-service.conf"
 elif [ -f "$HOME/.swift/coaster-service.conf" ]; then
    CONFIG_FILE="$HOME/.swift/coaster-service.conf"




More information about the Swift-commit mailing list