From f1ac38a852f4a8b1d352238ce8b2a56d303b37fe Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 26 Sep 2023 14:59:32 +0200 Subject: [PATCH] Update 00-local_mounts.sh --- .templates/00-local_mounts.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.templates/00-local_mounts.sh b/.templates/00-local_mounts.sh index 3ec3eccea..50e740df9 100755 --- a/.templates/00-local_mounts.sh +++ b/.templates/00-local_mounts.sh @@ -17,18 +17,8 @@ fi ## List available Disk with Labels and Id bashio::log.blue "---------------------------------------------------" -bashio::log.blue " By https://github.com/dianlight/hassio-addons " -#autodisks=($(lsblk -E label -n -o label | sed -r '/^\s*$/d' | grep -v hassos | grep pp)) -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.info "Available Disks :" +lsblk -o name,label,size,fstype,type,ro | awk '$5 != "" { print $0 }' bashio::log.blue "---------------------------------------------------" ######################