diff options
author | Britney Fransen <brfransen@gmail.com> | 2018-04-26 20:00:34 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2018-04-26 20:00:34 (GMT) |
commit | 168df166590c264c05a7385776d80c30591a6ba6 (patch) | |
tree | 32db16ae2a0fb40703acaacdd0997b92ca3fb57b /abs/core/xymon/xymon-hddtemp.sh | |
parent | 9c617a99340541fdd9caea24d89a75dd25fbd071 (diff) | |
download | linhes_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-x | abs/core/xymon/xymon-hddtemp.sh | 8 |
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 |