I need help configuring /etc/network/interfaces correctly. I want the file to do this for wlan:
If it is an open wlan, I want my laptop to connect to it right away, but if it is a closed one - look for a key and so on, in the interfaces-file.
This is what I have at the moment - for wlan, of course:
Code:
auto ath0
iface ath0 inet static
address <ip>
netmask <ip>
gateway <ip>
up iwconfig ath0 essid <essid>
up iwconfig ath0 key <key>
I know that if I want to connect to an open wlan, I need to have a config that looks like this:
Code:
auto ath0
iface ath0 inet dhcp
How can I combine those two?
Thanks in advance :-)