From 4c519e89754337e2f2265c128469bbd01e0589d8 Mon Sep 17 00:00:00 2001 From: Whytey Date: Thu, 24 Jun 2021 20:52:18 +1000 Subject: [PATCH] Update smartctl-storage-discovery.sh Fix where smartctl reports serial number as 'Serial number: ' not the title case 'Serial Number: '. --- smartctl-storage-discovery.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartctl-storage-discovery.sh b/smartctl-storage-discovery.sh index 27166f4..1c58e30 100644 --- a/smartctl-storage-discovery.sh +++ b/smartctl-storage-discovery.sh @@ -47,7 +47,7 @@ LLDSmart() temp_info=$($CTL -i $storage_name $storage_args) # Get device SN - storage_sn=$(/bin/echo ${temp_info} | grep "Serial Number:" | cut -f2 -d":" | sed -e 's/^\s*//') + storage_sn=$(/bin/echo ${temp_info} | grep -i "Serial Number:" | cut -f2 -d":" | sed -e 's/^\s*//') # Check duplicate storage if [[ ! -z $storage_sn ]] && [[ ! $disk_sn_all == *"$storage_sn"* ]]; then