[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/21: installer: Support WEP encrypted wireless.
From: |
John Darrington |
Subject: |
19/21: installer: Support WEP encrypted wireless. |
Date: |
Sun, 29 Jan 2017 07:35:02 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 5967eeece892e473ceeef828b9fda3d054b807b2
Author: John Darrington <address@hidden>
Date: Fri Jan 27 13:36:41 2017 +0100
installer: Support WEP encrypted wireless.
* gnu/system/installer/wireless.scm (wireless-connect): Pass an AP
instead of essid.
* gnu/system/installer/passphrase.scm (passphrase-key-handler): Adjust
the call appropriately.
---
gnu/system/installer/passphrase.scm | 2 +-
gnu/system/installer/wireless.scm | 24 ++++++++++++++++++------
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/gnu/system/installer/passphrase.scm
b/gnu/system/installer/passphrase.scm
index 491ac8c..b5b5170 100644
--- a/gnu/system/installer/passphrase.scm
+++ b/gnu/system/installer/passphrase.scm
@@ -93,7 +93,7 @@
((select-key? ch)
(wireless-connect
(page-datum page 'ifce)
- (assq-ref access-point 'essid)
+ access-point
(form-get-value form 'passphrase))
(page-leave (cdr (cdr page-stack))))
diff --git a/gnu/system/installer/wireless.scm
b/gnu/system/installer/wireless.scm
index a6e3b71..a10d2b9 100644
--- a/gnu/system/installer/wireless.scm
+++ b/gnu/system/installer/wireless.scm
@@ -247,21 +247,33 @@
-(define (wireless-connect ifce essid passphrase)
- "Connect the wireless interface IFCE to the network advertising ESSID using
-the key PASSPHRASE."
+(define (wireless-connect ifce access-point passphrase)
+ "Connect the wireless interface IFCE to ACCESS-POINT using the key
PASSPHRASE."
+
+ (let ((essid (assq-ref access-point 'essid))
+ (encr (assq-ref access-point 'encryption)))
+
(call-with-temporary-output-file
(lambda (filename port)
- (format port "
+
+ (format port
+ (if (eq? encr 'wep) "
+network={
+\tssid=\"~a\"
+\tkey_mgmt=NONE
+\twep_key0=\"~a\"
+}
+"
+"
network={
\tssid=\"~a\"
\tkey_mgmt=WPA-PSK
\tpsk=\"~a\"
}
-"
+")
essid
passphrase)
(force-output port)
(and (zero? (system* "wpa_supplicant" "-c" filename "-i" ifce "-B"))
- (zero? (system* "dhclient" ifce))))))
+ (zero? (system* "dhclient" ifce)))))))
- 08/21: installer: Prepare for new wireless network features., (continued)
- 08/21: installer: Prepare for new wireless network features., John Darrington, 2017/01/29
- 05/21: installer: Tolerate an undefined system role in config generation., John Darrington, 2017/01/29
- 09/21: installer: Clear the mount point field for swap file systems., John Darrington, 2017/01/29
- 03/21: installer: Add new procedure to check file system specifications., John Darrington, 2017/01/29
- 01/21: installer: Delete unused procedure "justify"., John Darrington, 2017/01/29
- 20/21: gurses: Add new procedure "word-endings"., John Darrington, 2017/01/29
- 14/21: gurses: Add predicate to test if a complex char is blank., John Darrington, 2017/01/29
- 12/21: gurses: Avoid one usage of car and cdr., John Darrington, 2017/01/29
- 15/21: gurses: Avoid one more use of car and cdr., John Darrington, 2017/01/29
- 13/21: gurses: xchar->char: New procedure., John Darrington, 2017/01/29
- 19/21: installer: Support WEP encrypted wireless.,
John Darrington <=
- 16/21: gurses: Avoid yet another use of car and cdr., John Darrington, 2017/01/29
- 11/21: installer: Fix the key map option., John Darrington, 2017/01/29
- 18/21: gurses: In paragraph-format avoid use of car and cdr., John Darrington, 2017/01/29
- 06/21: installer: Use a "hard" method of rebooting. Do not rely on shepherd., John Darrington, 2017/01/29
- 10/21: installer: Allow file system specifications to be removed., John Darrington, 2017/01/29
- 17/21: gurses: Use match instead of car/cdr in line-split., John Darrington, 2017/01/29
- 21/21: gurses: Reimplement pad-complex-string., John Darrington, 2017/01/29