summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-09-14 05:43:39 +0200
committerJames Rayner <james@archlinux.org>2009-09-14 08:24:08 +0200
commit3b2636322f4d72af1d5485baf2bdfb8d59077c7b (patch)
tree760f563760fd3e50c4702992abdcca427270d672
parent2e0232ccf156498b81c06044890e59fb4a6b7943 (diff)
downloadnetctl-3b2636322f4d72af1d5485baf2bdfb8d59077c7b.tar.gz
netctl-3b2636322f4d72af1d5485baf2bdfb8d59077c7b.tar.xz
remove duplicated list_networks
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
-rw-r--r--src/wireless40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/wireless b/src/wireless
index d118919..cab017e 100644
--- a/src/wireless
+++ b/src/wireless
@@ -84,46 +84,6 @@ find_ap() {
# Return a filename containing a list of network APs and ESSIDs found (sorted by decreasing signal strength)
# list_networks interface
-list_networks()
-{
- local INTERFACE="$1" essids
- # temp file used, as keeping ESSID's with spaces in their name in arrays
- # is hard, obscure and kinda nasty. This is simpler and clearer.
-
- [[ -z "$INTERFACE" ]] && return 1
- essids=$(mktemp --tmpdir essid.XXXXXXXX)
-
-
- wpa_supplicant -B -i$INTERFACE -Dwext -C/var/run/wpa_supplicant -P/var/run/wpa_supplicant.pid
- wpa_cli -i "$INTERFACE" scan &> /dev/null
- sleep 2.5
- wpa_cli -i "$INTERFACE" scan_results |
- grep -v "^Selected" |
- grep -v "^bssid" |
- sort -rn -k3 |
- sort -u -k5 |
- sort -rn -k3 |
- cut -f1,5 > "$essids"
-
- # Fields are tab delimited
- # Remove extraneous output from wpa_cli
- # Sort by strength
- # Remove duplicates
- # Re-sort by strength as the removal disorders the list
- # Cut to the AP/essid fields only
-
- kill $(cat /var/run/wpa_supplicant.pid)
-
- # File of 0 length, ie. no ssid's.
- if [[ ! -s "$essids" ]]; then
- rm -f "$essids"
- return 1
- fi
-
- echo $essids
- return 0
-}
-
list_networks() {
wpa_supplicant_scan_info "$1" 1,5
}