[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
148/197: installer: Support WEP encrypted wireless.
From: |
Danny Milosavljevic |
Subject: |
148/197: installer: Support WEP encrypted wireless. |
Date: |
Mon, 3 Jul 2017 20:37:16 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit b67aa1974f6d9c9475f63805364be4483fd11059
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)))))))
- 113/197: installer: Explicitly set the #:panel parameter for window creation procedures., (continued)
- 113/197: installer: Explicitly set the #:panel parameter for window creation procedures., Danny Milosavljevic, 2017/07/03
- 122/197: gurses: Populate the choices box in forms., Danny Milosavljevic, 2017/07/03
- 128/197: installer: Remove redundant list of file system types., Danny Milosavljevic, 2017/07/03
- 115/197: installer: New procedure refresh*., Danny Milosavljevic, 2017/07/03
- 153/197: installer: Add optional arguments to addstr*., Danny Milosavljevic, 2017/07/03
- 97/197: installer: Whitespace changes only, Danny Milosavljevic, 2017/07/03
- 139/197: installer: Allow file system specifications to be removed., Danny Milosavljevic, 2017/07/03
- 136/197: installer: No passphrase is needed for clear networks., Danny Milosavljevic, 2017/07/03
- 138/197: installer: Clear the mount point field for swap file systems., Danny Milosavljevic, 2017/07/03
- 135/197: installer: Use a "hard" method of rebooting. Do not rely on shepherd., Danny Milosavljevic, 2017/07/03
- 148/197: installer: Support WEP encrypted wireless.,
Danny Milosavljevic <=
- 176/197: installer: Fix incorrect symbol in generated config file., Danny Milosavljevic, 2017/07/03
- 177/197: installer: Remove non-existant supplementary group., Danny Milosavljevic, 2017/07/03
- 182/197: installer: Kill old dhclient instance before starting new one., Danny Milosavljevic, 2017/07/03
- 189/197: installer: Fix buglet where keys were sometimes ignored in users page., Danny Milosavljevic, 2017/07/03
- 179/197: installer: Mount all partitions instead of just the root., Danny Milosavljevic, 2017/07/03
- 190/197: gurses: forms: Minor refactor., Danny Milosavljevic, 2017/07/03
- 194/197: guix system: Remove outdated (gnu system grub) import., Danny Milosavljevic, 2017/07/03
- 197/197: installer: Use "G_" instead of "_"., Danny Milosavljevic, 2017/07/03
- 188/197: installer: Go back to main menu after "cancel", Danny Milosavljevic, 2017/07/03
- 184/197: installer: Create dedicated module to maintainer the page stack., Danny Milosavljevic, 2017/07/03