Update install-dsmon.sh
This commit is contained in:
@@ -39,7 +39,7 @@ fi
|
||||
echo -e "declare -A THRESHOLD" > /opt/idssys/dsmon/config.settings.inc
|
||||
echo ""
|
||||
|
||||
DRIVEINFO=`df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage' | awk '{ print $1 " " $2 " " $4 }'`
|
||||
DRIVEINFO=$(df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage|localhost|shm|overlay|-volume|Music|Software' | awk '{ print $1 " " $2 " " $4 }')
|
||||
DRIVEINFO=(${DRIVEINFO})
|
||||
NUMDRIVES=$((${#DRIVEINFO[@]} / 3))
|
||||
|
||||
@@ -52,21 +52,13 @@ for ((i = 0 ; i <= $((${NUMDRIVES}-1)) ; i++)); do
|
||||
ia=${ia//\/dev\/mapper\//}
|
||||
ia=${ia//\/dev\//}
|
||||
|
||||
if [ "${ia}" = "sda1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${ia}" = "sda14" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${ia}" = "sda15" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${ia}" = "sda2" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
if [[ "${ia}" = *"sda"* ]] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${ia}" = "shm" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${ia}" = "nvme0n1p1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
elif [[ "${ia}" = *"nvme"* ]] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ "${ia}" = "nvme1n1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 4096 ]; then
|
||||
systempartition=true
|
||||
elif [ "${ia}" = "mmcblk0p1" ] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
elif [[ "${ia}" = *"mmcblk"* ]] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
elif [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||
systempartition=true
|
||||
|
||||
Reference in New Issue
Block a user