From 60ec7e7d969839b3e9a1b124cdbe27c697ea1b2f Mon Sep 17 00:00:00 2001 From: Louwrentius Date: Sat, 21 Mar 2009 22:37:38 +0000 Subject: [PATCH] significant bugfixes when using no script --- branches/distributed-ppss/ppss.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/branches/distributed-ppss/ppss.sh b/branches/distributed-ppss/ppss.sh index 97bf01a..52c9e59 100755 --- a/branches/distributed-ppss/ppss.sh +++ b/branches/distributed-ppss/ppss.sh @@ -153,7 +153,7 @@ showusage () { echo -e "--user | -u The SSH user name that is used when logging in into the master SSH" echo -e " server." echo - echo -e "--script | -s Specifies the script/program that must be copied to the nodes for " + echo -e "--script | -S Specifies the script/program that must be copied to the nodes for " echo -e " execution through PPSS. Only used in the deploy mode." echo -e " This option should be specified if necessary when generating a config." echo @@ -659,13 +659,16 @@ deploy () { set_error $? scp -q $SSH_OPTS $SSH_KEY known_hosts $USER@$NODE:~/$PPSS_HOME_DIR set_error $? - scp -q $SSH_OPTS $SSH_KEY $SCRIPT $USER@$NODE:~/$PPSS_HOME_DIR - set_error $? + if [ ! -z "$SCRIPT" ] + then + scp -q $SSH_OPTS $SSH_KEY $SCRIPT $USER@$NODE:~/$PPSS_HOME_DIR + set_error $? + fi if [ ! -z "$INPUT_FILE" ] then - scp -q $SSH_OPTS $SSH_KEY $INPUT_FILE $USER@$NODE:~/$PPSS_HOME_DIR - set_error $? + scp -q $SSH_OPTS $SSH_KEY $INPUT_FILE $USER@$NODE:~/$PPSS_HOME_DIR + set_error $? fi if [ "$ERROR" == "0" ] @@ -694,7 +697,7 @@ deploy_ppss () { exit 1 fi - if [ ! -e "$SCRIPT" ] + if [ ! -e "$SCRIPT" ] && [ ! -z "$SCRIPT" ] then log INFO "ERROR - script $SCRIPT not found." cleanup