Backup, added break after mode check, some cleanups
This commit is contained in:
parent
2dcaced13b
commit
7c9da647b5
21
ppss
21
ppss
@ -35,6 +35,7 @@ do
|
|||||||
then
|
then
|
||||||
MODE="$1"
|
MODE="$1"
|
||||||
shift
|
shift
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -796,7 +797,7 @@ init_vars () {
|
|||||||
|
|
||||||
if [ -e "$CPUINFO" ]
|
if [ -e "$CPUINFO" ]
|
||||||
then
|
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"
|
log DSPLY "CPU: $CPU"
|
||||||
elif [ "$ARCH" == "Darwin" ]
|
elif [ "$ARCH" == "Darwin" ]
|
||||||
then
|
then
|
||||||
@ -806,7 +807,6 @@ init_vars () {
|
|||||||
elif [ "$ARCH" == "SunOS" ]
|
elif [ "$ARCH" == "SunOS" ]
|
||||||
then
|
then
|
||||||
CPU=`psrinfo -v | grep MHz | cut -d " " -f 4,8 | awk '{ printf ("Processor architecture: %s @ %s MHz.\n", $1,$2) }' | head -n 1`
|
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"
|
log DSPLY "$CPU"
|
||||||
else
|
else
|
||||||
log DSPLY "CPU: Cannot determine. Provide a patch for your arch!"
|
log DSPLY "CPU: Cannot determine. Provide a patch for your arch!"
|
||||||
@ -819,21 +819,21 @@ init_vars () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
does_file_exist "$PPSS_HOME_DIR"
|
does_file_exist "$PPSS_HOME_DIR"
|
||||||
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
|
if [ ! "$?" == "0" ]
|
||||||
then
|
then
|
||||||
log DEBUG "Remote PPSS home directory $PPSS_HOME_DIR does not exist. Creating."
|
log DEBUG "Remote PPSS home directory $PPSS_HOME_DIR does not exist. Creating."
|
||||||
exec_cmd "mkdir -p $PPSS_HOME_DIR/$PPSS_DIR"
|
exec_cmd "mkdir -p $PPSS_HOME_DIR/$PPSS_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
does_file_exist "$PPSS_HOME_DIR/$JOB_LOG_DIR"
|
does_file_exist "$PPSS_HOME_DIR/$JOB_LOG_DIR"
|
||||||
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
|
if [ ! "$?" == "0" ]
|
||||||
then
|
then
|
||||||
log DEBUG "Remote Job log directory $JOB_lOG_DIR does not exist. Creating."
|
log DEBUG "Remote Job log directory $JOB_lOG_DIR does not exist. Creating."
|
||||||
exec_cmd "mkdir $PPSS_HOME_DIR/$JOB_LOG_DIR"
|
exec_cmd "mkdir $PPSS_HOME_DIR/$JOB_LOG_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
does_file_exist "$ITEM_LOCK_DIR"
|
does_file_exist "$ITEM_LOCK_DIR"
|
||||||
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
|
if [ ! "$?" == "0" ]
|
||||||
then
|
then
|
||||||
log DEBUG "Creating remote item lock dir."
|
log DEBUG "Creating remote item lock dir."
|
||||||
exec_cmd "mkdir $ITEM_LOCK_DIR"
|
exec_cmd "mkdir $ITEM_LOCK_DIR"
|
||||||
@ -844,11 +844,14 @@ init_vars () {
|
|||||||
mkdir -p "$JOB_LOG_DIR"
|
mkdir -p "$JOB_LOG_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
does_file_exist "$REMOTE_OUTPUT_DIR"
|
if [ ! -z "$SSH_SERVER" ]
|
||||||
if [ ! "$?" == "0" ] && [ ! -z "$SSH_SERVER" ]
|
|
||||||
then
|
then
|
||||||
log DEBUG "Remote output dir $REMOTE_OUTPUT_DIR does not exist."
|
does_file_exist "$REMOTE_OUTPUT_DIR"
|
||||||
exec_cmd "mkdir $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
|
fi
|
||||||
|
|
||||||
if [ ! -e "$PPSS_LOCAL_TMPDIR" ]
|
if [ ! -e "$PPSS_LOCAL_TMPDIR" ]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
DEBUG="$1"
|
DEBUG="$1"
|
||||||
VERSION="2.62"
|
VERSION="2.63"
|
||||||
TMP_DIR="ppss"
|
TMP_DIR="ppss"
|
||||||
PPSS=./ppss
|
PPSS=./ppss
|
||||||
PPSS_DIR=ppss_dir
|
PPSS_DIR=ppss_dir
|
||||||
|
Loading…
Reference in New Issue
Block a user