So we fire up the notebook at home, work or hotel and have to go through a couple of steps to get connected. Having gone through this several times a day, I can tell you it gets old fast. I figured how about we make this task more automated, like make a script to check for an Ethernet connection (because sometimes there is a loose cable on the desk) then quit if true, or start the wifi.sh script if false.
This script I place in my home/tc/scripts dir and start it from X.d with a small delay. Now when my notebook starts I receive a selection of Access Points to choose from or use it as a reminder that I forgot to connect an Ethernet cable. doh!
#Checks for LAN connectivity then start wifi if needed
if [ -d /sys/class/net/eth0 ]; then
if [ -z "$ETH" ] || [ "$ETH" != 1 ]; then
if [ -d /sys/class/net/wlan0 ]; then
cliorx sudo wifi.sh
Ideally, I'd like to start the script outside of X but am still perfecting that... :|
ps. scrapped this script in favor of the one in last post