There are hotplug scripts that can detect whether a physical network cable is attached, allowing you to then activate the wired interface, otherwise activate your wireless connection, and wrap all this into your own startup script. Personally, I just bring up my wireless connection automatically on boot, then have a quick shell script that I can run to let me pick an additional network to connect into at work. An example would be:
Code:
#!/bin/bash
depmod -a
modprobe ndiswrapper
ifconfig eth0 down
ifconfig wlan0 down
iwconfig wlan0 essid "youressid"
iwconfig wlan0 key restricted [1] yourkey
ifconfig wlan0 youripaddress netmask yournetmask
route add default gw yourdefaultgw
ifconfig wlan0 up
and something similar for your wired connection. The whole script including the menu system can be found here -
http://www.fouldsy.com/?p=157 . Just adjust it to your needs.