Fix formatting in chooseInterface function to ensure proper variable expansion - with quotes, the dialog command throws the error:

Expected at least 20 tokens for --radi, have 5.
Use --help to list options.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2025-10-25 11:28:14 +01:00
parent c901aa1a2e
commit 1ca693866c

View File

@@ -694,10 +694,11 @@ chooseInterface() {
status="OFF"
done
# Disable check for double quote here as we are passing a string with spaces
# shellcheck disable=SC2086
PIHOLE_INTERFACE=$(dialog --no-shadow --keep-tite --output-fd 1 \
--cancel-label "Exit" --ok-label "Select" \
--radiolist "Choose An Interface (press space to toggle selection)" \
${r} ${c} "${interfaceCount}" "${interfacesList}")
${r} ${c} "${interfaceCount}" ${interfacesList})
result=$?
case ${result} in