# count number of menu items to adjust window sizee
LISTLENGHT="$((11+${#LIST[@]}/2))"
BOXLENGHT=${#LIST[@]}
# display warning only we have wifi
if[[" ${LIST[*]} "==*" Hotspot "*]];then
local disclaimer="\nNote: wireless networking in Linux is problematic. Our tools make it easy for some cases but can't enable AP on every random WiFi chip. If this tool fail, you are on your own.\n "
else
LISTLENGHT="$((6+${#LIST[@]}/2))"
fi
DIALOG_CANCEL=1
DIALOG_ESC=255
exec 3>&1
selection=$(dialog --backtitle"$BACKTITLE"--title"System and 3rd party software"--clear\
[[$(hcitool dev | sed'1d')!=""&&-n$(service bluetooth status | grep-w active | grep-w running)]]&& LIST+=("Bluetooth""Connect Bluetooth devices")
LIST+=("Network""Edit network settings")
# count number of menu items to adjust window sizee
LISTLENGHT="$((11+${#LIST[@]}/2))"
BOXLENGHT=${#LIST[@]}
# display warning only we have wifi
if[[" ${LIST[*]} "==*" Hotspot "*]];then
local disclaimer="\nNote: wireless networking in Linux is problematic. Our tools make it easy for some cases but can't enable AP on every random WiFi chip. If this tool fail, you are on your own.\n "
# count number of menu items to adjust window sizee
LISTLENGHT="$((11+${#LIST[@]}/2))"
BOXLENGHT=${#LIST[@]}
# display warning only we have wifi
if[[" ${LIST[*]} "==*" Hotspot "*]];then
local disclaimer="\nNote: wireless networking in Linux is problematic. Our tools make it easy for some cases but can't enable AP on every random WiFi chip. If this tool fail, you are on your own.\n "
else
LISTLENGHT="$((6+${#LIST[@]}/2))"
fi
DIALOG_CANCEL=1
DIALOG_ESC=255
exec 3>&1
selection=$(dialog --backtitle"$BACKTITLE"--title"Board and system settings"--clear\