If there is only one valid user then don't show selection
This commit is contained in:
parent
161875525d
commit
a9d8d0576d
|
@ -1309,11 +1309,15 @@ function select_user {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ $i -eq 1 ]; then
|
||||||
|
SELECTED_USERNAME="${name[0]}"
|
||||||
|
else
|
||||||
user_index=$(dialog --backtitle $"Freedombone Configuration" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
|
user_index=$(dialog --backtitle $"Freedombone Configuration" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
SELECTED_USERNAME="${name[$((user_index-1))]}"
|
SELECTED_USERNAME="${name[$((user_index-1))]}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function interactive_config {
|
function interactive_config {
|
||||||
|
|
|
@ -403,11 +403,15 @@ function select_user {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ $i -eq 1 ]; then
|
||||||
|
SELECTED_USERNAME="${name[0]}"
|
||||||
|
else
|
||||||
user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
|
user_index=$(dialog --backtitle $"Freedombone Control Panel" --title $"Select User" --menu $"Select one of the following:" 24 40 17 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
SELECTED_USERNAME="${name[$((user_index-1))]}"
|
SELECTED_USERNAME="${name[$((user_index-1))]}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function smtp_proxy {
|
function smtp_proxy {
|
||||||
|
|
Loading…
Reference in New Issue