Backup, added break after mode check, some cleanups
This commit is contained in:
parent
2dcaced13b
commit
7c9da647b5
15
ppss
15
ppss
@ -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,12 +844,15 @@ init_vars () {
|
||||
mkdir -p "$JOB_LOG_DIR"
|
||||
fi
|
||||
|
||||
if [ ! -z "$SSH_SERVER" ]
|
||||
then
|
||||
does_file_exist "$REMOTE_OUTPUT_DIR"
|
||||
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
|
||||
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" ]
|
||||
then
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEBUG="$1"
|
||||
VERSION="2.62"
|
||||
VERSION="2.63"
|
||||
TMP_DIR="ppss"
|
||||
PPSS=./ppss
|
||||
PPSS_DIR=ppss_dir
|
||||
|
Loading…
Reference in New Issue
Block a user