From a7f83ebe292eb3392db6fd25cb930ea78822aad0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 26 Apr 2023 14:30:02 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index c57af54e..6cf93957 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -559,11 +559,16 @@ STATUS(){ if [ "${ST_ACTION}" != "check" ]; then echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_NODETYPES[$NTYPE]}-Node${nid} (${nip})${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYello]}${LH}${idsCL[Default]}" DIVIDER false green - fi + fi + + echo -en " ${idsCL[LightCyan]}Gathering drive data from server ... {idsCL[Default]}" declare -A partitions partitions=`${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom|loop|overlay|shm|-volume|Music|media-data|Software' | awk '{ print $5 " " $1 }' | while read output; do echo $output | awk '{ print $2 }'; done;` partitions2=`echo ${partitions[*]}` partitions3=(${partitions2}) + echo -en "\e[1A"; + #echo -e "\e[0K\r ${idsCL[LightCyan]}Installing updates...${idsCL[Default]}" + for partition in "${partitions3[@]}"; do if [ "${partition}" != "udev" ] && [ "${partition}" != "/dev/sda1" ]; then pname=`echo "${partition}" | awk -F'/' ' { print $NF } '` >/dev/null 2>&1 @@ -571,7 +576,7 @@ STATUS(){ c=0; cw=40; spc='' spc1=${cw}-${#pname} until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo -en " ${pname}$spc: " + echo -en "\e[0K\r ${pname}$spc: " fi freespace=`${NCMD} df -hPBM ${partition} | awk '{print $4}' |tail -1|sed 's/M$//g'` >/dev/null 2>&1 if [ "${freespace}" -le "1000" ]; then