Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix interface selection on systems where more than one NICs are up
- Loading branch information
1 parent
54beb9b
commit ca3c2fa
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ if [[ $guessdefaults == 1 ]]; then | |
;; | ||
esac | ||
allinterfaces=$(getAllNetworkInterfaces) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Sebastian-Roth
Author
Member
|
||
strSuggestedInterface=${allinterfaces[0]} | ||
strSuggestedInterface=$(echo ${allinterfaces} | awk '{print $1}') | ||
if [[ -z $strSuggestedInterface ]]; then | ||
echo "ERROR: Not able to find a network interface that is up on your system." | ||
exit 1 | ||
|
instead of running two seperate internal functions, I think all you need to do to fix this is wrap the allinterfaces=$(getAllNetworkInterfaces) in a pair of () as well, so change line above to:
allinterfaces=($(getAllNetworkInterfaces))