Update nodemgmt-scripts.sh
This commit is contained in:
@@ -415,9 +415,7 @@ STATUS(){
|
||||
echo -e " ${idsCL[LightCyan]}${NM_NODETYPES[$NTYPE]}-Node1 (${!PH}) <--> ${idsST[Bold]}${NM_NODETYPES[$NTYPE]}-Node${nid} (${nip})${idsST[Reset]}${idsCL[Default]}"
|
||||
DIVIDER false green
|
||||
fi
|
||||
echo "checking host"
|
||||
checkhost=$(CHECK_HOST ${nip})
|
||||
echo "done"
|
||||
if [ "${checkhost}" != "false" ]; then
|
||||
if [ -f ${FOLDER}/${nip}.down ]; then
|
||||
if [ -f ${FOLDER}/${nip}.errtime ]; then
|
||||
@@ -433,17 +431,13 @@ STATUS(){
|
||||
var2=${NTYPE}_REPL_CHECK[@]
|
||||
# timeout=`date --date='20 seconds' +%s`
|
||||
for rcheck in "${!var2}"; do
|
||||
echo $rcheck
|
||||
if [ "${ST_ACTION}" != "check" ]; then
|
||||
echo "yes1"
|
||||
if [ "${ST_ACTION}" != "report" ]; then
|
||||
echo "yes2"
|
||||
c=0; cw=30; spc=''
|
||||
echo "${cw}-${#REPL_DESC[${rcheck}]}"
|
||||
spc1=${cw}-${#REPL_DESC[${rcheck}]}
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
else
|
||||
echo "no2"
|
||||
spc=' '
|
||||
fi
|
||||
echo -en " ${REPL_DESC[${rcheck}]}${spc}: "
|
||||
@@ -457,15 +451,12 @@ STATUS(){
|
||||
# fi
|
||||
|
||||
else
|
||||
echo "no1"
|
||||
timeout=`date --date='2 minutes' +%s`
|
||||
fi
|
||||
warn_timeout=`date --date='30 secs' +%s`
|
||||
echo "yes"
|
||||
|
||||
checked=false
|
||||
until [ "${checked}" = "" ]; do
|
||||
echo "checking"
|
||||
if [ "${PH_CMD}" = "" ]; then
|
||||
ssh -q root@${nip} [[ -f ${REPL_CHECKS[${rcheck}]}/test.repl ]] && checked=`ssh root@${nip} "cat ${REPL_CHECKS[${rcheck}]}/test.repl" | diff - ${REPL_CHECKS[${rcheck}]}/test.repl`
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user