Improve MOREDISKS data cleaning logic

Refactor MOREDISKS cleaning process using sed for better handling of spaces and commas.
This commit is contained in:
Alexandre
2026-02-02 17:18:10 +01:00
committed by GitHub
parent c4d0d38806
commit 4d907d27ce

View File

@@ -196,9 +196,7 @@ if bashio::config.has_value 'networkdisks'; then
CHARSET=",iocharset=utf8"
# Clean data (keeps NFS entries intact)
MOREDISKS=${MOREDISKS// \/\//,\/\/}
MOREDISKS=${MOREDISKS//, /,}
MOREDISKS=${MOREDISKS// /"\040"}
MOREDISKS="$(echo "$MOREDISKS" | sed -E 's/[[:space:]]*,[[:space:]]*/,/g; s/^[[:space:]]+//; s/[[:space:]]+$//')"
# CIFS domain/workgroup
DOMAINCLIENT=""