Updated version of distributed PPSS - does not work - not tested

This commit is contained in:
Louwrentius 2009-01-24 23:49:16 +00:00
parent 8bb8b7ead3
commit 2f8e031047

12
ppss.sh
View File

@ -246,9 +246,9 @@ exec_cmd () {
if [ ! -z "$SSH_SERVER" ] if [ ! -z "$SSH_SERVER" ]
then then
ssh "$SSH_OPTS" "$SSH_KEY" "$SSH_SERVER" "$CMD" ssh "$SSH_OPTS" "$SSH_KEY" "$SSH_SERVER" eval "$CMD"
else else
"$CMD" eval "$CMD"
fi fi
} }
@ -490,7 +490,7 @@ release_global_lock () {
if [ ! -z "$SSH_SERVER" ] if [ ! -z "$SSH_SERVER" ]
then then
ssh "$SSH_KEY" "$SSH_SERVER" rm -rf "$GLOBAL_LOCK" exec_cmd "rm -rf $GLOBAL_LOCK"
else else
rm -rf "$GLOBAL_LOCK" rm -rf "$GLOBAL_LOCK"
fi fi
@ -513,9 +513,9 @@ get_all_items () {
if [ -z "$INPUT_FILE" ] if [ -z "$INPUT_FILE" ]
then 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 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." check_status "$FUNCNAME" "Could not list files within remote source directory."
else else
ITEMS=`ls -1 $SRC_DIR` ITEMS=`ls -1 $SRC_DIR`
@ -529,7 +529,7 @@ get_all_items () {
done done
IFS=$IFS_BACKUP IFS=$IFS_BACKUP
else 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 then
scp "$SSH_KEY" "$SSH_SERVER:~/$INPUT_FILE" >> /dev/null 2>&! scp "$SSH_KEY" "$SSH_SERVER:~/$INPUT_FILE" >> /dev/null 2>&!
check_status "$FUNCNAME" "Could not copy input file." check_status "$FUNCNAME" "Could not copy input file."