[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
118/197: installer: Distinguish between Wifi encryption methods.
From: |
Danny Milosavljevic |
Subject: |
118/197: installer: Distinguish between Wifi encryption methods. |
Date: |
Mon, 3 Jul 2017 20:37:10 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit cc3032b44d0cf674f4518e4bdc14e7b08c7f1e50
Author: John Darrington <address@hidden>
Date: Wed Jan 18 15:01:53 2017 +0100
installer: Distinguish between Wifi encryption methods.
* gnu/system/installer/wireless.scm (get-wifi): Return a symbol in
the encryption field to indicaate the encryption type.
---
gnu/system/installer/wireless.scm | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/gnu/system/installer/wireless.scm
b/gnu/system/installer/wireless.scm
index e26b257..5c47d22 100644
--- a/gnu/system/installer/wireless.scm
+++ b/gnu/system/installer/wireless.scm
@@ -136,9 +136,10 @@
#:disp-proc
(lambda (d _)
(format #f "~30a ~a" (assq-ref d 'essid)
- (if (assq-ref d 'encryption)
- (M_ "Encr.")
- (M_ "Clear")))))))
+ (or
+ (and=> (assq-ref d 'encryption)
+ symbol->string)
+ (M_ "clear")))))))
(addstr* text-window (format #f
(gettext
@@ -197,9 +198,20 @@
(cons
(append (car prev)
(list `(encryption .
- ,(string-suffix? "on" x))))
+ ;; Assume WEP encryption until we
know
+ ;; otherwise.
+ ,(if (string-suffix? "on" x) 'wep
#f))))
(cdr prev)))
+ ((string-match "^IE: *IEEE 802.11i" x)
+ ;; If we find the above string, and encryption is on, then the
encrpytion
+ ;; type is probably WPA2
+ (let ((current-ap (car prev)))
+ (if (assq-ref current-ap 'encryption)
+ (cons (assq-set! current-ap 'encryption 'wpa2)
+ (cdr prev))
+ prev)))
+
((string-prefix? "Quality=" x)
(let ((lvl (string-match "level=(-?[0-9][0-9]*) dBm" x)))
(if lvl
- 98/197: installer: Correct bug detecting a wireless interface., (continued)
- 98/197: installer: Correct bug detecting a wireless interface., Danny Milosavljevic, 2017/07/03
- 91/197: installer: Add callback parameter for forms., Danny Milosavljevic, 2017/07/03
- 95/197: installer: Add a predicate to ensure the partitions have been formatted., Danny Milosavljevic, 2017/07/03
- 102/197: installer: Correct bug where the timezone page returned to the wrong page., Danny Milosavljevic, 2017/07/03
- 119/197: gurses: Allow menu update to work for panel windows., Danny Milosavljevic, 2017/07/03
- 103/197: installer: Avoid exception when the device to format cannot be found., Danny Milosavljevic, 2017/07/03
- 116/197: installer: Fix bug in config generation., Danny Milosavljevic, 2017/07/03
- 105/197: installer: Extend the 'file-system' concept to include swap spaces., Danny Milosavljevic, 2017/07/03
- 83/197: installer: "Setup" --> "Set up", Danny Milosavljevic, 2017/07/03
- 92/197: installer: Remove mkfs capability from mount points page., Danny Milosavljevic, 2017/07/03
- 118/197: installer: Distinguish between Wifi encryption methods.,
Danny Milosavljevic <=
- 127/197: gurses: Remove box from form popup window., Danny Milosavljevic, 2017/07/03
- 123/197: installer: Add a popup window for forms which have multiple choice fields., Danny Milosavljevic, 2017/07/03
- 121/197: installer: Note which types of file system are supported., Danny Milosavljevic, 2017/07/03
- 141/197: gurses: Avoid one usage of car and cdr., Danny Milosavljevic, 2017/07/03
- 151/197: installer: Avoid wpa_supplicant's output causing screen damage., Danny Milosavljevic, 2017/07/03
- 99/197: installer: Exit the format page after all partitions are successfully formatted., Danny Milosavljevic, 2017/07/03
- 101/197: installer: Replace one usage of car with match., Danny Milosavljevic, 2017/07/03
- 109/197: installer: Fix bug where the selected item of main page was not indicated., Danny Milosavljevic, 2017/07/03
- 104/197: installer: Support btrfs, Danny Milosavljevic, 2017/07/03
- 111/197: gurses: Change highlighting from bold to inverse., Danny Milosavljevic, 2017/07/03