From 01a6ebcba6897c588fe3e26fc68fb09ed6713ef1 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 18 Aug 2025 04:29:52 -0400 Subject: [PATCH] satisfy shellcheck for disk-smart-test --- configuration.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/configuration.nix b/configuration.nix index d6a24dd..a7fb730 100644 --- a/configuration.nix +++ b/configuration.nix @@ -182,9 +182,6 @@ smartmontools ]; - # i gotta fix that - excludeShellChecks = [ "SC2010" ]; - text = '' #!/bin/sh set -e @@ -193,8 +190,10 @@ exit 2 fi - DISKS=$(ls /dev/sd* | grep -v "[0-9]$") - for i in $DISKS; do + for i in /dev/disk/by-id/*; do + case "$i" in + *\\-part[0-9]*) continue ;; + esac echo -n "$i " smartctl -a "$i" | grep "SMART overall-health self-assessment test result:" | cut -d' ' -f6 done