[arch-projects] [netcfg] [PATCH 1/2] [scripts/wifi-menu]: Quote a text passphrase
Jouke Witteveen
j.witteveen at gmail.com
Thu Aug 9 11:24:16 EDT 2012
On Tue, Aug 7, 2012 at 10:11 PM, Thomas Bächler <thomas at archlinux.org> wrote:
> Text passphrases may contain spaces and should be quoted in the netcfg profile
> ---
> scripts/wifi-menu | 2 +-
> 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
>
> diff --git a/scripts/wifi-menu b/scripts/wifi-menu
> index 10353f8..4b1db24 100755
> --- a/scripts/wifi-menu
> +++ b/scripts/wifi-menu
> @@ -117,7 +117,7 @@ create_profile()
> key=$(wpa_passphrase "$1" "$key" | grep -m 1 "^[[:space:]]*psk=")
> key="KEY=${key#*psk=}"
> else
> - key="KEY=$(printf "%q" "$key")"
> + key="KEY='$(printf "%q" "$key")'"
> fi
> fi
> cat << EOF > "$PROFILE_DIR/$PROFILE"
> --
> 1.7.11.4
>
The %q already takes care of that.
More information about the arch-projects
mailing list