Fixed missing quotes bug & suppressed rfkill error.

Fixed a bug caused by a blank variable not being quoted (syntax error).
Redirected rfkill's error to log file when no wireless devices are available.
This commit is contained in:
root 2017-12-30 22:45:48 -06:00
parent a375a4fb4a
commit a892810f16
2 changed files with 2 additions and 2 deletions

View File

@ -356,7 +356,7 @@ function fluxion_set_language() {
function fluxion_unset_interface() {
# Unblock interfaces to make them available.
echo -e "$FLUXIONVLine $FLUXIONUnblockingWINotice"
rfkill unblock all
rfkill unblock all &> $FLUXIONOutputDevice
# Find all monitor-mode interfaces & all AP interfaces.
echo -e "$FLUXIONVLine $FLUXIONFindingExtraWINotice"

View File

@ -187,7 +187,7 @@ function interface_prompt() {
fi
# If only one interface exists and it's available, choose it.
if [ ${#__interface_prompt__ifAvailable[@]} -eq 1 -a ${__interface_prompt__ifAvailableState[0]} = "[+]" ]; then
if [ "${#__interface_prompt__ifAvailable[@]}" -eq 1 -a "${__interface_prompt__ifAvailableState[0]}" = "[+]" ]; then
InterfacePromptWISelected="${__interface_prompt__ifAvailable[0]}"
InterfacePromptWISelectedState="[+]" # It passed the condition, it must be +
InterfacePromptWISelectedInfo="${__interface_prompt__ifAvailableInfo[0]}"