[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/26: installer: Distinguish between Wifi encryption methods.
From: |
John Darrington |
Subject: |
14/26: installer: Distinguish between Wifi encryption methods. |
Date: |
Sun, 22 Jan 2017 12:09:24 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 98d0b24a68457c3840a1dbe773bd84e29ebeedf2
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
- branch wip-installer updated (613ab98 -> 61c0ffb), John Darrington, 2017/01/22
- 02/26: installer: Properly handle swap partitions when generating the configuration., John Darrington, 2017/01/22
- 07/26: gurses: Change highlighting from bold to inverse., John Darrington, 2017/01/22
- 04/26: installer: Do not add file systems which are invalid., John Darrington, 2017/01/22
- 10/26: installer: Check that swap spaces have not been assigned mount points, John Darrington, 2017/01/22
- 14/26: installer: Distinguish between Wifi encryption methods.,
John Darrington <=
- 01/26: installer: Extend the 'file-system' concept to include swap spaces., John Darrington, 2017/01/22
- 21/26: installer: Do not assume the root file system is of type "ext4"., John Darrington, 2017/01/22
- 17/26: installer: Note which types of file system are supported., John Darrington, 2017/01/22
- 25/26: installer: Emphasise that writing filesystems destroys existing data., John Darrington, 2017/01/22
- 05/26: installer: Fix bug where the selected item of main page was not indicated., John Darrington, 2017/01/22
- 08/26: gurses: form: Use match instead of car, cdr etc., John Darrington, 2017/01/22
- 03/26: installer: Do not allow the creation of invalid file-system specificaitons., John Darrington, 2017/01/22
- 15/26: gurses: Allow menu update to work for panel windows., John Darrington, 2017/01/22
- 18/26: gurses: Populate the choices box in forms., John Darrington, 2017/01/22
- 06/26: installer: Add an explanatory text to the main page., John Darrington, 2017/01/22