:: Re: [DNG] netman GIT project
Góra strony
Delete this message
Reply to this message
Autor: Isaac Dunham
Data:  
Dla: dng
Temat: Re: [DNG] netman GIT project
On Tue, Aug 25, 2015 at 10:35:21PM +0200, Irrwahn wrote:
> On Tue, 25 Aug 2015 21:16:08 +0100, Edward Bartolo wrote:
> > The contents of interfaces files created by backend are as follows,
> > but if necessary, we can create more than more template, although it
> > doesn't look it will be necessary.
> >
> > Interfaces File Contents:
> >
> > auto lo
> > iface lo inet loopback
> >
> > iface wlan0 inet dhcp
> > wpa-ssid EB-TP-LNK67
> > wpa-psk "************"
>
> <snip>
>
> And that's exactly crunchpoint: How is the wpa-ssid line
> processed by ifup, and does it accept the P"xyz\x0Ablah"
> syntax used by wpa-supplicant?


It is exported as IF_WPA_SSID in the environment passed to
/etc/network/if-*.d/*.
/etc/network/if-*.d/wpasupplicant sources a file that sources
/etc/wpa_supplicant/functions.sh, which runs quoted strings through
echo/sed, then passes the value of IF_WPA_SSID as an argument to
wpa_cli_do, which is a shell function that calls wpa_cli.
I have no idea whether the \ escapes hold up to all that, but as long as
you have them adequately escaped, they do not need a different format for
quoting.

HTH,
Isaac Dunham