#!/bin/bash

#set the SSID
sudo /sbin/iwconfig eth1 essid "WLAN"

#set the mode
sudo /sbin/iwconfig eth1 mode managed

#set the encryption key. 
#first one for ascii, second for hex and third for no key
sudo /sbin/iwconfig eth1 key s:your_asciikey
#sudo /sbin/iwconfig eth1 key 00-00-00-00-00-00-00-00-00-00-00-00-00
#sudo /sbin/iwconfig eth1 key off

#get IP via DHCP
sudo /sbin/dhclient eth1

#you may set the default gateway
#sudo /sbin/route add default gw 192.168.0.1

