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
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
|
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
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
Just use '' to quote values with spaces. Other way is using \ before the space:
params="wlan0 mode managed essid FOO\ BAR"
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".
James