summaryrefslogtreecommitdiffstats
path: root/abs/core/xymon/xymon-hddtemp.sh
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-04-26 20:00:34 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-04-26 20:00:34 (GMT)
commit168df166590c264c05a7385776d80c30591a6ba6 (patch)
tree32db16ae2a0fb40703acaacdd0997b92ca3fb57b /abs/core/xymon/xymon-hddtemp.sh
parent9c617a99340541fdd9caea24d89a75dd25fbd071 (diff)
downloadlinhes_pkgbuild-168df166590c264c05a7385776d80c30591a6ba6.zip
linhes_pkgbuild-168df166590c264c05a7385776d80c30591a6ba6.tar.gz
linhes_pkgbuild-168df166590c264c05a7385776d80c30591a6ba6.tar.bz2
xymon: closes #1012
Diffstat (limited to 'abs/core/xymon/xymon-hddtemp.sh')
-rwxr-xr-xabs/core/xymon/xymon-hddtemp.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/abs/core/xymon/xymon-hddtemp.sh b/abs/core/xymon/xymon-hddtemp.sh
index 7084abc..0369b4a 100755
--- a/abs/core/xymon/xymon-hddtemp.sh
+++ b/abs/core/xymon/xymon-hddtemp.sh
@@ -2,7 +2,7 @@
# NOTE: Must be run as root, so you probably need to setup sudo for this.
-ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' |
+ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' -ve '/md' |
while read DISK
do
DISKDEV=`ls -l $DISK | awk -F/ '{print $NF}'`
@@ -17,7 +17,11 @@ do
#check if device is mounted
if ! mount | grep -q /dev/$DISKDEV
then
- continue
+ # check if device is used by mdadm
+ if ! cat /proc/mdstat | grep -q $DISKDEV
+ then
+ continue
+ fi
fi
#check if SMART is disabled and enable