Update nodemgmt-scripts.sh

This commit is contained in:
2019-12-13 00:14:24 -06:00
parent e9ef7618d0
commit 48ebdeff56

View File

@@ -384,7 +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'
@@ -403,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