LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
LinkBack Search this Thread
Old 09-22-2006, 08:08 PM   #1
chiquitomuir
LQ Newbie
 
Registered: Nov 2004
Location: Utah, USA
Distribution: FC5
Posts: 10

Rep: Reputation: 0
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
 
Old 09-22-2006, 08:38 PM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
you should supply the full path of the commands you are issuing i.e.

/sbin/iwconfig wlan0 essid "ACTIONTEC"
 
Old 09-22-2006, 08:45 PM   #3
chiquitomuir
LQ Newbie
 
Registered: Nov 2004
Location: Utah, USA
Distribution: FC5
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 09-22-2006, 08:47 PM   #4
Leisy
Member
 
Registered: Sep 2006
Location: Brno, Czech Republic
Distribution: Fedora
Posts: 56

Rep: Reputation: 15
and it is also better to put that in separate file and run that in rc.local (with full path as mentioned before)
 
Old 09-22-2006, 09:02 PM   #5
chiquitomuir
LQ Newbie
 
Registered: Nov 2004
Location: Utah, USA
Distribution: FC5
Posts: 10

Original Poster
Rep: Reputation: 0
No dice, even w/ the full path it still says it can't find the commands.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Simple Samba Issue clickster Linux - Server 5 08-31-2006 02:55 PM
Need help with a simple script shell script WindowBreaker Linux - Software 2 12-15-2005 12:45 PM
BASH - simple script issue - syntax? tw1ggy5 Programming 11 05-21-2004 09:09 AM
Simple C Shell script is not so simple elconde Programming 2 09-16-2001 11:53 PM


All times are GMT -5. The time now is 08:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration