Guys, I'm trying to reply to several emails at once...

Isaac Dunham:
wpa_supplicant would be the only process reading/writing the file, but
you need five commands at minimum.
Here's roughly how you'd add an open network with wpa_cli:
NETNUM=`wpa_cli add_network` || fail
wpa_cli set_network $NETNUM ssid "$SSID" || fail
wpa_cli set_network $NETNUM key_mgmt NONE || fail
wpa_cli enable_network $NETNUM || fail
wpa_cli save_config || fail

And doing it manually:
cat $CONFIG >$TEMPFILE || fail
echo -e "network={\n\tssid=$SSID\n\tkey_mgmt=NONE\n}\n" >>$TEMPFILE || fail
cp $TEMPFILE $CONFIG

Didier Kryn:
Shown like this, the manual method looks simpler, but it implies, in addition to the race condition which, I admit, is mostly hypothetical, the necessity to gain root priviledge.


Isaac Dunham:
>
>     Don't you think this initial file could be created during package
>installation? For wpa_gui as well. It could be re-created with
>dpkg-reconfigure.
Theoretically, it would be nice if this happened when wpa_supplicant
was installed; no other package has a logical reason to provide a
systemwide default config file.
Practically,
(a) no distro that I'm aware of ships wpa_supplicant with a configuration
file, and
(b) I originally wrote it without any expectation of it being properly
packaged; I use a built-from-scratch musl/busybox system frequently,
and this was one of the main targets.


Didier Kryn:
This is not done in the wpa_supplicant package, but it could be part of the new UI package to install a default file if none exists.

There is a small issue which is writing the interfaces file. To my knowledge, no package modifies interfaces; this file is generated by the Debian Installer and then only hacked by the admin. I think it could be possible to check for the presence of the line "iface default inet dhcp" and add it if absent - or let the Devuan Installer do it in the first place.

Simon Hobson:
> >I am pretty sure there are very few cases where a wifi connection needs a 
static IP config. For the vast majority of cases, the config is dynamic and one 
single id_str is enough for all; doing otherwise would bloat the interfaces file for 
the sole sake of this description.
>That makes sense - provided that it's still possible to manually add entries 
which fall into that other 1%.
Renaud (Ron) OLGIATI:
I hope so, since my home LAN is all fixed IP addresses.  ;-3)

I think there is a limit to what a UI can do, in particular when it comes to hacking the interfaces file - I don't know of any application doing that. I think hacking the interfaces file must be left to the admin with the text-editor and I guess you guys are able to do it. But the wpa UI should be able to manage the wpa side. Currently wpa_gui allows the user to specify the id_str.

Isaac Dunham:
I think wpa_id_str is adequate as far as a "description phrase",
apart from the fact that you don't want it to be invalid for a logical
interface.

Didier Kryn:
It comes to my mind (sorry I'm slow) that id_str is exactly meant as an informal description of the wifi station, and it is an abuse by Debian to use it for interface mapping. Following this, I see another possibility (besides asking the author of wpa_supplicant to add a new variable): encode the interface name inside the id_str, either as the 1st token, or as a sentence like "iface=foo", which would imply to modify the ifupdown scripts.

    Didier

_______________________________________________
Dng mailing list
[email protected]
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to