Backup, added break after mode check, some cleanups

This commit is contained in:
Louwrentius 2010-04-14 21:22:04 +00:00
parent 2dcaced13b
commit 7c9da647b5
2 changed files with 13 additions and 10 deletions

21
ppss
View File

@ -35,6 +35,7 @@ do
then
MODE="$1"
shift
break
fi
done
@ -796,7 +797,7 @@ init_vars () {
if [ -e "$CPUINFO" ]
then
CPU=`cat /proc/cpuinfo | grep 'model name' | cut -d ":" -f 2 | sed -e s/^\ //g | sort | uniq`
CPU=`cat $CPUINFO | grep 'model name' | cut -d ":" -f 2 | sed -e s/^\ //g | sort | uniq`
log DSPLY "CPU: $CPU"
elif [ "$ARCH" == "Darwin" ]
then
@ -806,7 +807,6 @@ init_vars () {
elif [ "$ARCH" == "SunOS" ]
then
CPU=`psrinfo -v | grep MHz | cut -d " " -f 4,8 | awk '{ printf ("Processor architecture: %s @ %s MHz.\n", $1,$2) }' | head -n 1`
log DSPLY "$CPU"
else
log DSPLY "CPU: Cannot determine. Provide a patch for your arch!"
@ -819,21 +819,21 @@ init_vars () {
fi
does_file_exist "$PPSS_HOME_DIR"
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
if [ ! "$?" == "0" ]
then
log DEBUG "Remote PPSS home directory $PPSS_HOME_DIR does not exist. Creating."
exec_cmd "mkdir -p $PPSS_HOME_DIR/$PPSS_DIR"
fi
does_file_exist "$PPSS_HOME_DIR/$JOB_LOG_DIR"
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
if [ ! "$?" == "0" ]
then
log DEBUG "Remote Job log directory $JOB_lOG_DIR does not exist. Creating."
exec_cmd "mkdir $PPSS_HOME_DIR/$JOB_LOG_DIR"
fi
does_file_exist "$ITEM_LOCK_DIR"
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
if [ ! "$?" == "0" ]
then
log DEBUG "Creating remote item lock dir."
exec_cmd "mkdir $ITEM_LOCK_DIR"
@ -844,11 +844,14 @@ init_vars () {
mkdir -p "$JOB_LOG_DIR"
fi
does_file_exist "$REMOTE_OUTPUT_DIR"
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
if [ ! -z "$SSH_SERVER" ]
then
log DEBUG "Remote output dir $REMOTE_OUTPUT_DIR does not exist."
exec_cmd "mkdir $REMOTE_OUTPUT_DIR"
does_file_exist "$REMOTE_OUTPUT_DIR"
if [ ! "$?" == "0" ]
then
log DEBUG "Remote output dir $REMOTE_OUTPUT_DIR does not exist."
exec_cmd "mkdir $REMOTE_OUTPUT_DIR"
fi
fi
if [ ! -e "$PPSS_LOCAL_TMPDIR" ]

View File

@ -1,7 +1,7 @@
#!/bin/bash
DEBUG="$1"
VERSION="2.62"
VERSION="2.63"
TMP_DIR="ppss"
PPSS=./ppss
PPSS_DIR=ppss_dir