Hi there el_koraco, and thanks again for the tutorial. And thanks to you, I have been able to displace NetworkManager with wpa_gui :-) Huzzah! But that said, I think a little more needs to be said here about how the static/dhcp setup of an IP address is achieved, when wpa-roam is being used.
When I first tried to connect to wifi with ifupdown and wpa-roam/wpa_gui, the network connected okay, but without the config of an IP address. So had to type in 'dhclient wlan0' just to make it usable. The reason why that happened is because after wpa_supplicant has established an encrypted connection, it will then again call ifup, and requests it to map the physical interface 'wlan0' onto some other logical interface, which in most cases is named 'default'.
But if that logical interface 'default' isn't defined in the /e/n/i, then when the wpa_supplicant script requests ifup to map 'wlan0' onto 'default', then the ifup will just exit with an error, becos the 'default' interface is undefined. Such that the dhcp/static config of an IP address will never occur. So to prevent that, we need to append this line to the /e/n/i
And similarly, for each id_str="some_name" entry contained within the network stanzas defined in your /etc/wpa_supplicant/wpa-roam.conf file, another logical interface needs to be declared in you /e/n/i. And these multiple logical interface declarations can each specify a different kinds of dhcp/static configuration, as required. So yes, it is very flexible...
I hope that all makes sense. Clear as mud, huh? But if not, then I think this manpage entry here may help...
$ man wpa_action |sed '70,$ !d'