Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-22-2006, 08:08 PM
|
#1
|
|
LQ Newbie
Registered: Nov 2004
Location: Utah, USA
Distribution: FC5
Posts: 10
Rep:
|
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
|
|
|
|
09-22-2006, 08:38 PM
|
#2
|
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
you should supply the full path of the commands you are issuing i.e.
/sbin/iwconfig wlan0 essid "ACTIONTEC"
|
|
|
|
09-22-2006, 08:45 PM
|
#3
|
|
LQ Newbie
Registered: Nov 2004
Location: Utah, USA
Distribution: FC5
Posts: 10
Original Poster
Rep:
|
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.
|
|
|
|
09-22-2006, 08:47 PM
|
#4
|
|
Member
Registered: Sep 2006
Location: Brno, Czech Republic
Distribution: Fedora
Posts: 56
Rep:
|
and it is also better to put that in separate file and run that in rc.local (with full path as mentioned before)
|
|
|
|
09-22-2006, 09:02 PM
|
#5
|
|
LQ Newbie
Registered: Nov 2004
Location: Utah, USA
Distribution: FC5
Posts: 10
Original Poster
Rep:
|
No dice, even w/ the full path it still says it can't find the commands.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:44 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|