Can people handle typing these passwords blindly? I suspect yes. Then this seems like a reasonable solution.
Klemens Nanni <[email protected]> wrote: > On Sun, Oct 17, 2021 at 01:29:23PM +0000, Klemens Nanni wrote: > > On Sun, Oct 17, 2021 at 11:33:48AM +0300, Pasi-Pekka Karppinen wrote: > > > When doing a fresh install and you are at the point where you are > > > configuring a wireless network, the installer is asking you to provide a > > > WPA/WPA2 security passphrase for the wireless network - if your WPA/WPA2 > > > passphrase starts with a “!” character (exclamation mark), the installer > > > won’t accept the passphrase. > > > > It has been like this forever, i.e. this is not 7.0 specific. > > > > I don't think it is worth adding an exception for this particular > > question as it'd break the expectation of `!'s behaviour, seems rare > > enough to accept and would add needless complexity. > > > > Not being able to download sets, on the other hand, can be bummer > > during install/upgrade, but then again full offline install images as > > well as sysupgrade(8) are available, so that can be worked around. > > Then again, WEP/WPA passphrases could be treated like user passwords. > Simple code change, but behaviour would change, i.e. the passphrase is > not echoed anymore. > > You can try the following diff for that. I have not tested it yet > (no setup to install over wifi here). > > Either apply the diff and build your favourite install medium or try > this quick hack in a ramdisk shell before you start to see if that > prompts, connects and installs hostname.* just fine: > > sed -i '/WPA passphrase/ { s/until/password/ ; s/$/ ; resp=$_password/ ; }' > /install.sub > > > > Index: install.sub > =================================================================== > RCS file: /cvs/src/distrib/miniroot/install.sub,v > retrieving revision 1.1180 > diff -u -p -r1.1180 install.sub > --- install.sub 17 Oct 2021 13:20:46 -0000 1.1180 > +++ install.sub 17 Oct 2021 17:35:15 -0000 > @@ -1245,19 +1245,19 @@ ieee80211_config() { > quote nwid "$_nwid" >>$_hn > break > ;; > - ?-[Ww]) ask_until "WEP key? (will echo)" > + ?-[Ww]) ask_until "WEP key?" > # Make sure ifconfig accepts the key. > - if _err=$(ifconfig $_if nwid "$_nwid" nwkey > "$resp" 2>&1) && > + if _err=$(ifconfig $_if nwid "$_nwid" nwkey > "$_password" 2>&1) && > [[ -z $_err ]]; then > - quote nwid "$_nwid" nwkey "$resp" >>$_hn > + quote nwid "$_nwid" nwkey "$_password" > >>$_hn > break > fi > echo "$_err" > ;; > - 1-[Pp]) ask_until "WPA passphrase? (will echo)" > + 1-[Pp]) ask_password "WPA passphrase?" > # Make sure ifconfig accepts the key. > - if ifconfig $_if nwid "$_nwid" wpakey "$resp"; > then > - quote nwid "$_nwid" wpakey "$resp" > >>$_hn > + if ifconfig $_if nwid "$_nwid" wpakey > "$_password"; then > + quote nwid "$_nwid" wpakey "$_password" > >>$_hn > break > fi > ;; > >
