Simple script issue...I think
I'm trying to setup a script that runs when my system starts up. I've edited my /etc/rc.d/rc.local file to contain the following:
---------------------------------------------------- #!/bin/bash #Load ndiswrapper module echo "Starting Ndiswrapper Driver..." /sbin/modprobe ndiswrapper #Setup Essid echo "Setting up ESSID..." iwconfig wlan0 essid "ACTIONTEC" #Setup WEP Key if you have one #Uncomment below for WEP echo "Setting up KEY..." iwconfig wlan0 key XXXX-XXXX-XX #Setting up DHCP on wlan0 echo "Starting DHCP on wlan0 [ 10 sec timeout ]" dhcpcd -t 10 wlan0 ------------------------------------------------------ Now, when my system starts up, I get the following: Starting Ndiswrapper Driver... : command not found Setting up ESSID... : command not found Setting up KEY... Error for wireless request "Set Encode" (8B2A) : ". invalid argument "XXXX-XXXX-XX : command not found: Starting DHCP on wlan0 [ 10 sec timeout ] I've got to be missing something simple, as when I run these commands from the command line, viola! it all works fine. Any suggestions? Can anyone spot my problem? Any help is much appreciated. Thanks |
you should supply the full path of the commands you are issuing i.e.
/sbin/iwconfig wlan0 essid "ACTIONTEC" |
I'll try modifying the script...but I don't think it's that, I issued the full path to modprobe and it still said that it couldn't find the command.
|
and it is also better to put that in separate file and run that in rc.local (with full path as mentioned before)
|
No dice, even w/ the full path it still says it can't find the commands.
|
All times are GMT -5. The time now is 08:03 PM. |