satisfy shellcheck for disk-smart-test
This commit is contained in:
@@ -182,9 +182,6 @@
|
|||||||
smartmontools
|
smartmontools
|
||||||
];
|
];
|
||||||
|
|
||||||
# i gotta fix that
|
|
||||||
excludeShellChecks = [ "SC2010" ];
|
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
@@ -193,8 +190,10 @@
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DISKS=$(ls /dev/sd* | grep -v "[0-9]$")
|
for i in /dev/disk/by-id/*; do
|
||||||
for i in $DISKS; do
|
case "$i" in
|
||||||
|
*\\-part[0-9]*) continue ;;
|
||||||
|
esac
|
||||||
echo -n "$i "
|
echo -n "$i "
|
||||||
smartctl -a "$i" | grep "SMART overall-health self-assessment test result:" | cut -d' ' -f6
|
smartctl -a "$i" | grep "SMART overall-health self-assessment test result:" | cut -d' ' -f6
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user