netcardconfig: sed command resets WPASECRET
authorLukas Prokop <admin@lukas-prokop.at>
Wed, 5 Sep 2012 14:02:05 +0000 (16:02 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 5 Sep 2012 14:24:01 +0000 (16:24 +0200)
On second invocation the password might end up being empty.
Then there's no chance to get a working netcardconfig
again without manually editing /etc/network/interfaces,
as the ugly awk command line can not parse the file
any longer with an incomplete wpa-psk line.

sbin/netcardconfig

index 87e8c68..d3ea772 100755 (executable)
@@ -335,8 +335,7 @@ configiface() {
             fi
           done
 
-          # make sure backslashes inside passphrase are handled correct
-          WPASECRET=$(sed -e 's/\\/\\/g' "$TMP") && rm -r "$TMP"
+          rm -f "$TMP"
 
           case $WPA_DEV in
                hostap)