summaryrefslogtreecommitdiffstats
path: root/abs/core/xymon/xymon-hddtemp.sh
diff options
context:
space:
mode:
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