Skip to content

Commit

Permalink
Merge pull request #7 from Whytey/Fix-serial-number-case-sensitive
Browse files Browse the repository at this point in the history
Update smartctl-storage-discovery.sh
  • Loading branch information
nikimaxim authored Jun 24, 2021
2 parents 41ebf80 + 4c519e8 commit 871a298
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smartctl-storage-discovery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 871a298

Please sign in to comment.