Protect MACHINEDOTS var

This commit is contained in:
Jeremy Gardais 2020-06-09 11:59:33 +02:00
parent 1e315eedeb
commit 8377f3ddce
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 5 additions and 5 deletions

View File

@ -144,11 +144,11 @@ get_status()
### Check the jobs
###
get_header "Jobs" "$QSTAT -l hostname=$MACHINEDOTS"
jobs=$(${QSTAT} -l hostname=${MACHINEDOTS} -s r -u \*)
jobs=$(${QSTAT} -l hostname="${MACHINEDOTS}" -s r -u \*)
if [ -z "$jobs" ]; then
echo "No Running Jobs"
else
${QSTAT} -l hostname=${MACHINEDOTS} -s r -u \*
${QSTAT} -l hostname="${MACHINEDOTS}" -s r -u \*
fi
get_footer
@ -156,7 +156,7 @@ get_status()
### Check the host
###
get_header "Host" "$METAHS -i"
${QHOST} -h ${MACHINEDOTS} | grep -v "global"
${QHOST} -h "${MACHINEDOTS}" | grep -v "global"
get_footer
###
@ -171,10 +171,10 @@ get_status()
###
queueTriggered=false;
# Queueset=$(${QHOST} -h ${MACHINEDOTS} -q | tail +5 | awk '{ print $1 }')
${QHOST} -h ${MACHINEDOTS} -q | tail +5 > "${PLUGIN_RESULT}.QSTATE"
${QHOST} -h "${MACHINEDOTS}" -q | tail +5 > "${PLUGIN_RESULT}.QSTATE"
Queueset=$(< "${PLUGIN_RESULT}.QSTATE" awk '{ print $1 }')
for Qset in $Queueset; do
# qstate=$(${QHOST} -q -h ${MACHINEDOTS} | tail +5 | grep " $Qset" | awk '{print $4}')
# qstate=$(${QHOST} -q -h "${MACHINEDOTS}" | tail +5 | grep " $Qset" | awk '{print $4}')
qstate=$(grep " $Qset" "${PLUGIN_RESULT}.QSTATE" | awk '{print $4}')
# Order determines more significant color status