mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Search directly for disk in by-label and by-uuid
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user