FS#2829 - wireless configuration cannot handle essid with spaces

Attached to Project: Arch Linux
Opened by Thomas Rydzynski (qsorix) - Monday, 13 June 2005, 18:07 GMT
Last edited by James Rayner (iphitus) - Monday, 10 December 2007, 23:13 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Judd Vinet (judd)
dtw (dibblethewrecker)
James Rayner (iphitus)
Architecture All
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

File /etc/conf.d/wireless defines parameters to iwconfig in form:
params="wlan0 mode managed essid FOO"
And later they are used like this:
iwconfig $params

This method can't handle an essid containing spaces because shell splits such essids into next arguments and iwconfig doesn't know what to do with it.

I need to invoke command:
iwconfig wlan0 essid "ASK - LAS"

To do this, using this (IMHO well splitted) set of files, you should use different field separator or array of arguments. As far as I know it is impossible using command 'cmd $params'

Thanks,
qrx
This task depends upon

Closed by  James Rayner (iphitus)
Monday, 10 December 2007, 23:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  conf.d/wireless will be deprecated upon netcfg2, netcfg2 handles this correctly
Comment by Jan de Groot (JGC) - Monday, 13 June 2005, 20:40 GMT
params="wlan0 mode managed essid 'FOO BAR'"

Just use '' to quote values with spaces. Other way is using \ before the space:
params="wlan0 mode managed essid FOO\ BAR"
Comment by Thomas Rydzynski (qsorix) - Monday, 13 June 2005, 21:45 GMT
I'd checked both and neither had worked. Now I cannot check it again (away from that PC)

But now I've checked it again using:
#!/bin/sh
. ./file-with-params-def
for i in $params ; do echo $i; done

And it gave me:

wlan0
mode
managed
FOO\
BAR

Where
wlan0
mode
managed
FOO BAR
was expected after params="wlan0 mode managed FOO\ BAR".
Comment by arjan timmerman (blaasvis) - Wednesday, 02 November 2005, 10:19 GMT
is this resolved ?
Comment by James Rayner (iphitus) - Monday, 10 September 2007, 23:08 GMT
it's fixed in netcfg2, not conf.d/wireless, though I intend to deprecate conf.d/wireless when netcfg2 merges...

James

Loading...