mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-23 09:11:50 +02:00
Update 00-local_mounts.sh
This commit is contained in:
@@ -37,17 +37,18 @@ if bashio::config.has_value 'localdisks'; then
|
|||||||
disk="${disk##*/}"
|
disk="${disk##*/}"
|
||||||
|
|
||||||
# Function to check what is the type of device
|
# Function to check what is the type of device
|
||||||
if lsblk | grep -q "^$1"; then
|
if [ -e /dev/"$disk" ]; then
|
||||||
echo "... $disk is a physical device."
|
echo "... $disk is a physical device"
|
||||||
devpath=/dev
|
devpath=/dev
|
||||||
elif lsblk -o UUID | grep -q "$1"; then
|
elif lsblk -o UUID | grep -q "$disk"; then
|
||||||
echo "... $disk is a device by UUID."
|
echo "... $disk is a device by UUID"
|
||||||
devpath=/dev/disk/by-uuid
|
devpath=/dev/disk/by-uuid
|
||||||
elif lsblk -o LABEL | grep -q "$1"; then
|
elif lsblk -o LABEL | grep -q "$disk"; then
|
||||||
echo "... $disk is a device by label."
|
echo "... $disk is a device by label"
|
||||||
devpath=/dev/disk/by-label
|
devpath=/dev/disk/by-label
|
||||||
else
|
else
|
||||||
echo "$disk does not match any known physical device, UUID, or label."
|
bashio::log.fatal "$disk does not match any known physical device, UUID, or label. "
|
||||||
|
sleep 1m
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Creates dir
|
# Creates dir
|
||||||
|
|||||||
Reference in New Issue
Block a user