Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th June 2005, 08:06 PM
easethan Offline
Registered User
 
Join Date: Jun 2005
Posts: 19
Startup Script to Activate WLAN Adapter

For some reason trying to activate my adapter(D-Link DWL-G510 Rev B.) through the network settings app freezes the kernel, a known problem with this adapter. I'm asuming that 'ifup ath0' is the same command that the network settings uses as this freezes it too.

I did find out how to activate the adapter from someone who has the same card, but it requires root to perform some of the actions, so I can't put it in ifcfg-ath0(or can I somehow?). Could you help me figure out how to perform the below commands at startup, using the root user?

modprobe ath_pci
ifconfig ath0 down
ifconfig ath0 up
iwconfig ath0 channel 6 essid "My Network" key "FFFFFFFFFFFFFFFF" (possibly not required)
dhclient ath0

I'm a new linux user and there are some software limitations that are already starting to deter me. If I can't get this to run at startup I probably won't stick with linux, and I want to!
Reply With Quote
  #2  
Old 9th June 2005, 08:08 PM
bytesniper's Avatar
bytesniper Offline
Registered User
 
Join Date: May 2005
Location: Abq, NM
Age: 35
Posts: 1,158
put those commands at the end of this file:
/etc/rc.local
__________________
I am root. If you see me laughing you better have a backup.
Reply With Quote
  #3  
Old 9th June 2005, 09:06 PM
easethan Offline
Registered User
 
Join Date: Jun 2005
Posts: 19
Thanks bytesniper this worked great!

I have another question though. I would like to use the time-sync option, but the rc.local file doesn't run until after the computer tries to sync the clock. Is there a way I can run this script before the time sync occurs?

Could this possibly be done by changing the order of things in rc.d? I thought this might be possible through this file considering the similar file name and the fact that it appears that rc.d actually calls rc.local...but I could be completely wrong as it could just be a log file(considering the dates).

Thanks!
Reply With Quote
  #4  
Old 9th June 2005, 09:45 PM
easethan Offline
Registered User
 
Join Date: Jun 2005
Posts: 19
Whew! I did it!

I opened up rc.d and discovered that if you hit enter on any of the lines it sends you to a config file for the corrosponding procedure...or whatever, not sure of all the terminology yet.

So I got to the network one, figured out how to use the 'action' command and added my stuff to the file. Works perfectly! I still don't know how to make all of my actions run using just one 'action' command, so when you startup I made it show something like:

Bringing up ath0 - modeprobe: [OK]
Bringing up ath0 - down: [OK]
Bringing up ath0 - up: [OK]
Bringing up ath0 - config: [OK]
Bringing up ath0 - dhclient: [OK]

Corrosponding to

modprobe ath_pci
ifconfig ath0 down
ifconfig ath0 up
iwconfig ath0 channel 6 essid "My Network" key "FFFFFFFFFFFFFFFF" (possibly not required)
dhclient ath0

But it works so I can't complain too much.

NOTE TO ALL: If you don't have above average programming skills do not try this! PHP skills are most likely sufficient to figure it out.

Thanks so much for your help bytesniper!!!
Reply With Quote
  #5  
Old 9th June 2005, 09:50 PM
bytesniper's Avatar
bytesniper Offline
Registered User
 
Join Date: May 2005
Location: Abq, NM
Age: 35
Posts: 1,158
you can insert it into any part of the boot process you want to, depending on how much effort you want to put into it. what is loaded up in the boot process and in what order is controlled by the /etc/rc1.d through /etc/rc5.d (rc6.d is shutdown stuff in case you were wondering). everything in rc1.d-rc6.d are symlinks to what is in /etc/init.d. so it works like this: i want something to boot up in runlevel 3 and 5. i make an init script and put it into /etc/init.d and then go into /etc/rc3.d and /etc/rc5.d and provide symlinks to ../init.d/scriptname. when 'init 3' is called in the boot process every symlink in rc3.d is executed, therefore starting your daemons. same for the other runlevels. so, make a script that starts what you want it to start and put it in init.d. (see note1 at this point) and then symlink it from rc#.d where you want it to start. the S## and K## on the symlinks is ther to determine their boot order within the runlevel.

chkconfig can automatically manage what runlevel your script starts as and then you can manage it as a service. man chkconfig for more info on it.

hope this helps!
__________________
I am root. If you see me laughing you better have a backup.
Reply With Quote
  #6  
Old 9th June 2005, 09:52 PM
bytesniper's Avatar
bytesniper Offline
Registered User
 
Join Date: May 2005
Location: Abq, NM
Age: 35
Posts: 1,158
ah... ignore that last post then! good job
sorry.. i have a habit of making things harder than they need to be
__________________
I am root. If you see me laughing you better have a backup.
Reply With Quote
  #7  
Old 9th June 2005, 09:54 PM
easethan Offline
Registered User
 
Join Date: Jun 2005
Posts: 19
Oh thanks for that info bytesniper! I just put my stuff in the network area of init.d. Later I'll make it in it's own area as per your suggestion. Although I figured out the jist of it on my own thanks for the info you provided!

lol I was sitting there the whole time I was editing, afraid I was completely screwing up my computer because I had no idea what I was doing!

Thanks again bytesniper! You've been a lot of help!
Reply With Quote
Reply

Tags
activate, adapter, script, startup, wlan

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My WLAN adapter doesn't work. mabool Hardware & Laptops 3 13th August 2009 02:45 PM
Cannot activate wireless USB adapter on boot dpapathanasiou Servers & Networking 7 5th August 2007 02:51 PM
Can't get zd1211rw wlan device to activate at boot pwalden Servers & Networking 3 11th March 2007 06:27 PM
FC5 wlan adapter Lastomega Servers & Networking 0 31st March 2006 01:13 AM
Wlan Adapter Installation Linux Noob Servers & Networking 1 12th September 2005 07:49 AM


Current GMT-time: 12:47 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat