summaryrefslogtreecommitdiffstats
path: root/abs/core/xymon/xymon-smart.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/xymon/xymon-smart.sh')
-rwxr-xr-xabs/core/xymon/xymon-smart.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/abs/core/xymon/xymon-smart.sh b/abs/core/xymon/xymon-smart.sh
index 1ad3cc7..f951158 100755
--- a/abs/core/xymon/xymon-smart.sh
+++ b/abs/core/xymon/xymon-smart.sh
@@ -4,15 +4,13 @@
if test -f /tmp/dres; then rm -f /tmp/dres; fi
-# MODIFY below to match your setup - the "scsi-SATA" is pretty generic, but you
-# can add more disks if you like. E.g. I have a USB disk permanently plugged in.
-
-ls /dev/disk/by-id/scsi-* /dev/disk/by-id/ata-* /dev/disk/by-id/usb-* | grep -v -- -part | sort |
+ls /dev/disk/by-id/* | grep -ve '-part' -ve '/wwn-' |
while read DISK
do
DISKDEV=`ls -l $DISK | awk -F/ '{print $NF}'`
#check if disk is removable
+ RM=0
RM=`cat /sys/block/$DISKDEV/removable`
if test $RM -ne 0
then
@@ -62,4 +60,3 @@ $XYMON $XYMSRV "status ${MACHINE}.smart ${COLOR} SMART Health Check
rm -f /tmp/dres /tmp/dcheck
exit 0
-