Skip to content

Commit

Permalink
Search directly for disk in by-label and by-uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Apr 27, 2024
1 parent 1037b40 commit e34490c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .templates/00-local_mounts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ if bashio::config.has_value 'localdisks'; then
if [ -e /dev/"$disk" ]; then
echo "... $disk is a physical device"
devpath=/dev
elif lsblk -o UUID | grep -q "$disk"; then
elif [ -e /dev/disk/by-uuid/"$disk" ] || lsblk -o UUID | grep -q "$disk"; then
echo "... $disk is a device by UUID"
devpath=/dev/disk/by-uuid
elif lsblk -o LABEL | grep -q "$disk"; then
elif [ -e /dev/disk/by-label/"$disk" ] || lsblk -o LABEL | grep -q "$disk"; then
echo "... $disk is a device by label"
devpath=/dev/disk/by-label
else
Expand Down

0 comments on commit e34490c

Please sign in to comment.