LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 11-07-2006, 05:44 PM   #1
Brynn
Member
 
Registered: Jul 2006
Location: Grimsby UK
Distribution: ubuntu 7.04
Posts: 61

Rep: Reputation: 15
Running network scripts on boot


I'm not sure if this is the correct place to post this one but its a start. I've just upgraded to fc6 and i used ndiswrapper to load my wifi card. last time i did this i wrote a small script that activated it on boot and placed it in /etc/rc.d/rc.local. The script says
Quote:
#!/bin/bash

export PATH=$PATH:/sbin

/sbin/iwconfig wlan0 essid linksys

/sbin/iwconfig wlan0 mode Managed

/sbin/iwconfig wlan0 key restricted XXXXXXXXXX

/sbin/ifconfig wlan0 up

/sbin/dhclient wlan0
i remember doing something else in vi with my path so that a had the permissions for that script to run but i can't remember what it was. i've been googling and had no luck so does anybody know what i need to do or if theres a better way to have the card activated on boot.

any help always appreciated.

ps, is this spell check on the run an upgrade to the website or fc6/firefox?
 
Old 11-07-2006, 06:19 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi Brynn,

You need to be superuser to write anything in /etc/rc.d directory. Before you run vi, you should enter "su -" and give the root password; then, as root, edit the rc.local file.

If you are creating the file, then you need to give it "execute permission" after it is saved.
You have to enter, again as root:
Code:
chmod +x /etc/rc.d/rc.local
By the way, I think "spell check" is an ancient option. New is the "advanced option".
 
Old 11-08-2006, 06:23 AM   #3
Brynn
Member
 
Registered: Jul 2006
Location: Grimsby UK
Distribution: ubuntu 7.04
Posts: 61

Original Poster
Rep: Reputation: 15
Okie, i've just given that a go and no luck. It still says permission denied on boot. I think need to add the permissions to my $PATH somehow so that the system can execute the commands at startup in whichever runlevel it starts in?
 
Old 11-08-2006, 07:07 AM   #4
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Hi Brynn,

Can you tell me if you insert your commands into /etc/rc.d/rc.local or you are calling your script from it?

If it's the second choice, you need also to make it executable with:
Code:
chmod +x <your script name>
 
Old 11-08-2006, 09:26 AM   #5
Brynn
Member
 
Registered: Jul 2006
Location: Grimsby UK
Distribution: ubuntu 7.04
Posts: 61

Original Poster
Rep: Reputation: 15
I was calling it originally and had done chmod +x on it but after reading your post i decided to add it to the bottom of the file so that it now looks /etc/rc.d/rc.local
Quote:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local.local


export PATH=$PATH:/sbin

/sbin/iwconfig wlan0 essid linksys

/sbin/iwconfig wlan0 mode Managed

/sbin/iwconfig wlan0 key restricted FB28B34F70

/sbin/ifconfig wlan0 up

/sbin/dhclient wlan0
 
Old 11-08-2006, 09:35 AM   #6
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Did it work this way?
 
Old 11-08-2006, 10:39 AM   #7
Brynn
Member
 
Registered: Jul 2006
Location: Grimsby UK
Distribution: ubuntu 7.04
Posts: 61

Original Poster
Rep: Reputation: 15
nope. it still says
Quote:
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device wlan0 ; Operation not permitted.
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Operation not permitted.
Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; Operation not permitted.
SIOCSIFFLAGS: Permission denied
during the startup sequence
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
running scripts at boot dglock Linux - General 3 08-15-2006 02:15 PM
Running Scripts at Boot, via Cron etc maxhugen Linux - Newbie 2 12-06-2005 10:42 PM
running scripts at boot... thedp SUSE / openSUSE 2 10-17-2005 09:21 AM
running scripts at boot viniosity Ubuntu 3 07-19-2005 09:52 PM
Running scripts at boot time saintt Linux - Software 1 08-09-2002 06:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 06:28 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration