From e83dfa9582a7203f6def8c389d7c07f57efc9b1f Mon Sep 17 00:00:00 2001 From: Louwrentius Date: Sat, 24 Jan 2009 23:49:16 +0000 Subject: [PATCH] Updated version of distributed PPSS - does not work - not tested --- trunk/ppss.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/trunk/ppss.sh b/trunk/ppss.sh index 618ecbd..9332ae9 100755 --- a/trunk/ppss.sh +++ b/trunk/ppss.sh @@ -246,9 +246,9 @@ exec_cmd () { if [ ! -z "$SSH_SERVER" ] then - ssh "$SSH_OPTS" "$SSH_KEY" "$SSH_SERVER" "$CMD" + ssh "$SSH_OPTS" "$SSH_KEY" "$SSH_SERVER" eval "$CMD" else - "$CMD" + eval "$CMD" fi } @@ -490,7 +490,7 @@ release_global_lock () { if [ ! -z "$SSH_SERVER" ] then - ssh "$SSH_KEY" "$SSH_SERVER" rm -rf "$GLOBAL_LOCK" + exec_cmd "rm -rf $GLOBAL_LOCK" else rm -rf "$GLOBAL_LOCK" fi @@ -513,9 +513,9 @@ get_all_items () { if [ -z "$INPUT_FILE" ] then - if [ ! -z "SSH_SERVER" ] # Are we running stand-alone or as a slave?" + if [ ! -z "$SSH_SERVER" ] # Are we running stand-alone or as a slave?" then - ITEMS=`ssh "$SSH_KEY" "$SSH_SERVER" ls -1 $SRC_DIR` + ITEMS=`exec_cmd ls -1 $SRC_DIR` check_status "$FUNCNAME" "Could not list files within remote source directory." else ITEMS=`ls -1 $SRC_DIR` @@ -529,7 +529,7 @@ get_all_items () { done IFS=$IFS_BACKUP else - if [ ! -z "SSH_SERVER" ] # Are we running stand-alone or as a slave?" + if [ ! -z "$SSH_SERVER" ] # Are we running stand-alone or as a slave?" then scp "$SSH_KEY" "$SSH_SERVER:~/$INPUT_FILE" >> /dev/null 2>&! check_status "$FUNCNAME" "Could not copy input file."