[LEDE-DEV] [PATCH v2 2/5] mac80211: use uci to generate wireless config file

Matthias Schiffer mschiffer at universe-factory.net
Wed Oct 12 05:05:15 PDT 2016


On 10/12/2016 01:42 PM, Jonas Gorski wrote:
> On 11 October 2016 at 13:37, Christian Lamparter
> <chunkeey at googlemail.com> wrote:
>> Previously, wifi detect simply dumped its generated wireless
>> configuration out to STDOUT. A second step was needed to
>> append the configuration to /etc/config/wireless (or create
>> it, if it didn't exist).
>>
>> With this patch, The wifi detection script will now use uci
>> to update the wireless configuration directly.
>>
>> Note: uci writes a "cfg123456" printout to stdout when it
>> generates a name for the unnamed section ("add wireless wifi-iface").
> 
> This rather sounds like a bug in uci, at least I would expect it to
> generate no output if it is invoked with "-q", neither on stdout nor
> stderr.
> 
>> Since we currently pipe wifi detect into /etc/config/wireless, we
>> have to redirected this output, so it doesn't end up in the wireless
>> configuration file.
> 
> I wonder if it wouldn't be better to keep "detect" output to stdout,
> and add a new command that modifies the uci config (e.g. "update" or
> "refresh"). People might rely/expect the current behavior, and get
> confused when it stops working.
> 
> 
> Jonas
> 

Maybe we could just rename wifi-detect to something different, so nobody
would expect the old behaviour? Keeping two separate code paths doesn't
seem like a good idea to me.

Regards,
Matthias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20161012/ca2667cb/attachment.sig>


More information about the Lede-dev mailing list