diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2019-01-21 02:53:52 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2019-01-21 02:53:52 +0000 |
commit | 1156458c25c125374252c1fbdb0b90218141a37d (patch) | |
tree | fd6191947f16698d3af8233fe7fabff8cb931fd2 | |
parent | 7c8e1067afbe521cfde80a516ac99d975797be68 (diff) |
when installing over wifi, move nwid and wpakey/nwkey to be on the same line
(a later step will move to using join in config files, but since not all
adapters support join (due to them not using the net80211 framework), that
requires more work and testing.)
OK krw@ halex@
-rw-r--r-- | distrib/miniroot/install.sub | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index ac0f3101a10..ad7f4480f17 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1107 2019/01/20 21:13:56 tb Exp $ +# $OpenBSD: install.sub,v 1.1108 2019/01/21 02:53:51 phessler Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -1200,29 +1200,30 @@ ieee80211_config() { # 'any' implies that only open access points are considered. if [[ $_nwid != any ]]; then - ifconfig $_if nwid "$_nwid" - quote nwid "$_nwid" >>$_hn _prompt="Security protocol? (O)pen, (W)EP" ((_haswpa == 1)) && _prompt="$_prompt, WPA-(P)SK" while :; do ask_until "$_prompt" "O" case "$_haswpa-$resp" in - ?-[Oo]) break + ?-[Oo]) # No further questions + ifconfig $_if nwid "$_nwid" + quote nwid "$_nwid" >>$_hn + break ;; ?-[Ww]) ask_until "WEP key? (will echo)" # Make sure ifconfig accepts the key. - if _err=$(ifconfig $_if nwkey "$resp" 2>&1) && + if _err=$(ifconfig $_if nwid "$_nwid" nwkey "$resp" 2>&1) && [[ -z $_err ]]; then - quote nwkey "$resp" >>$_hn + quote nwid "$_nwid" nwkey "$resp" >>$_hn break fi echo "$_err" ;; 1-[Pp]) ask_until "WPA passphrase? (will echo)" # Make sure ifconfig accepts the key. - if ifconfig $_if wpakey "$resp"; then - quote wpakey "$resp" >>$_hn + if ifconfig $_if nwid "$_nwid" wpakey "$resp"; then + quote nwid "$_nwid" wpakey "$resp" >>$_hn break fi ;; |