From e34490c7117e4ae4bde37e6b375e5c5388be2a83 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 27 Apr 2024 22:28:12 +0200 Subject: [PATCH] Search directly for disk in by-label and by-uuid --- .templates/00-local_mounts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.templates/00-local_mounts.sh b/.templates/00-local_mounts.sh index 230cd5d6d..e65d2067f 100755 --- a/.templates/00-local_mounts.sh +++ b/.templates/00-local_mounts.sh @@ -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