mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 22:34:11 +02:00
Update 00-local_mounts.sh
This commit is contained in:
@@ -17,18 +17,8 @@ fi
|
|||||||
|
|
||||||
## List available Disk with Labels and Id
|
## List available Disk with Labels and Id
|
||||||
bashio::log.blue "---------------------------------------------------"
|
bashio::log.blue "---------------------------------------------------"
|
||||||
bashio::log.blue " By https://github.com/dianlight/hassio-addons "
|
bashio::log.info "Available Disks :"
|
||||||
#autodisks=($(lsblk -E label -n -o label | sed -r '/^\s*$/d' | grep -v hassos | grep pp))
|
lsblk -o name,label,size,fstype,type,ro | awk '$5 != "" { print $0 }'
|
||||||
readarray -t autodisks < <(lsblk -E label -n -o label -i | sed -r '/^\s*$/d' | grep -v hassos)
|
|
||||||
if [ ${#autodisks[@]} -eq 0 ]; then
|
|
||||||
bashio::log.info "No Disk with labels."
|
|
||||||
else
|
|
||||||
bashio::log.info "Available Disk Labels:"
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
for disk in "${autodisks[@]}"; do
|
|
||||||
bashio::log.info "\t${disk}[$(lsblk $(blkid -L "$disk") -no fstype)]"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
bashio::log.blue "---------------------------------------------------"
|
bashio::log.blue "---------------------------------------------------"
|
||||||
|
|
||||||
######################
|
######################
|
||||||
|
|||||||
Reference in New Issue
Block a user