satisfy shellcheck for disk-smart-test

This commit is contained in:
2025-08-18 04:29:52 -04:00
parent 91ff16f698
commit 01a6ebcba6

View File

@@ -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