From 4fdb3f7ce4b30cd27a8965c550044830b638a674 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 13 Dec 2019 00:11:14 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 6fbea977..a005aeb6 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -384,6 +384,7 @@ STATUS(){ partitions3=(${partitions2}) for partition in "${partitions3[@]}"; do if [ "${partition}" != "udev" ] && [ "${partition}" != "/dev/sda1" ]; then + pname=`echo "${partition}" | awk -F'/' ' { print $NF } '` freespace=`${NCMD} df -hPBM ${partition} | awk '{print $4}' |tail -1|sed 's/M$//g'` if [ "${freespace}" -le "1000" ]; then fs_status='error' @@ -402,10 +403,10 @@ STATUS(){ fi if [ "${ST_ACTION}" != "check" ]; then - c=0; cw=50; spc='' + c=0; cw=20; spc='' spc1=${cw}-${#partition} until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo -en " ${partition}$spc: " + echo -en " ${pname}$spc: " echo -e "${idsCL[${fs_status_color}]}${freespace} MB${idsCL[Default]}" fi fi