I wrote a script called "wireless.sh" and I want to call it from /etc/rc.d/rc.local.
What is the command (yes, I tried google) to call an external script from this start-up script?
If this this startup script calls this external "wireless.sh" script, and a wired eth0 is present and functioning, which interface will be used? I think the hardwired one will be used. I don't want to put these commands in /etc/rc.d/rc.local. And thanks for the excellent how-to on wireless networking, without which, I never could have done this.
OK, here it the script; comments are welcome, and please feel free to use it.
# establishes ath0 wireless connection to the Linksys Router, using WEP or WPA encryption
# Change all "ath0" to whatever your interface may be.
# set the router ESSID
iwconfig ath0 essid "linksys"
# not sure ....
iwconfig ath0 mode Managed
# Channel = Auto or the channel #
iwconfig ath0 channel 6
# Access point
iwconfig ath0 ap any
# set the WEP encryption key (edit the XXXXXXXXXX)
iwconfig ath0 key XXXXXXXXXX
# Connect with WPA encryption
wpa_supplicant -B -Dwext -iath0 -c/etc/wpa_supplicant.conf
#start the network using dhcp
dhcpcd -t 25 -d ath0