mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-13 17:40:31 +02:00
Github bot : script beautyshied
This commit is contained in:
@@ -6,21 +6,21 @@
|
||||
####################
|
||||
|
||||
function list_drives () {
|
||||
bashio::log.info "List of available labels (@dianlight)"
|
||||
bashio::log.blue "---------------------------------------------------"
|
||||
#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 "List of available labels (@dianlight)"
|
||||
bashio::log.blue "---------------------------------------------------"
|
||||
#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
|
||||
else
|
||||
bashio::log.info "Available Disk Labels:"
|
||||
# shellcheck disable=SC2068
|
||||
for disk in ${autodisks[@]}; do
|
||||
# shellcheck disable=SC2046
|
||||
bashio::log.info "\t${disk}[$(lsblk $(blkid -L "$disk") -no fstype)]"
|
||||
done
|
||||
fi
|
||||
bashio::log.blue "---------------------------------------------------"
|
||||
fi
|
||||
bashio::log.blue "---------------------------------------------------"
|
||||
}
|
||||
|
||||
######################
|
||||
|
||||
Reference in New Issue
Block a user