Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I make my Wireless LAN commands run on boot?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cheater512
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2003
Posts: 145
Location: Australia

PostPosted: Fri Sep 24, 2004 11:25 am    Post subject: How do I make my Wireless LAN commands run on boot? Reply with quote

I tried quite a few 'solutions' on these forums to get my wireless lan working (D-Link DWL-120).

I downloaded the linux-wlan-ng source and compiled it according to the instructions here and it works fine.
But I need to execute the following commands to initilise the adapter:
Code:
modprobe prism2_usb prism2_doreset=1
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
wlanctl-ng wlan0 lnxreq_autojoin ssid=<your ssid> authtype=opensystem
ifconfig wlan0 <your IP address>


How can I execute these during bootup? Or is there a easier way to do the same thing?
Back to top
View user's profile Send private message
BiOCHiP
n00b
n00b


Joined: 07 Jul 2002
Posts: 57
Location: Amsterdam

PostPosted: Fri Sep 24, 2004 11:36 am    Post subject: Reply with quote

First of all, you'll have to make the options the default setting. That's done by adding a file to /etc/modules.d/ with an arbitrary name, which contains:

Code:

options prism2_usb prism2_doreset=1


Furthermore, autoloading modules at boot can be done in two ways: the fully automatic way or the semi-automatic way. The latter works by editing /etc/modules.autoload.d/kernel-2.6 (or kernel-2.4, if you use a 2.4 kernel) and adding prism2_usb right there.

The fully automatic way makes use of hotplugging. Well, in fact it's called cold plugging if your computer detects hardware at boot. Anyway, you'll have to emerge hotplug and then do an rc-update add hotplug default. You might need some kernel support, too, I'm not sure. But there're lots of hotplug topics all over the forum.

Edit: hey, i was not even reading your original post correctly. Gimme a minute to interpret the new information :)

Okay, one solution, although it might not be the most elegant one, is adding the two commands you've to execute to /etc/conf.d/local.start.
The ifconfig one isn't needed, if you make an /etc/init.d/net.wlan0 and add the appropriate entries to /etc/conf.d/net.

Another solution is to walk through this /etc/conf.d/net until you find the 'advanced configuration' and find the functions like 'preup'. You might be able to insert your needed commands there.
_________________
Music is the Answer
Back to top
View user's profile Send private message
cheater512
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2003
Posts: 145
Location: Australia

PostPosted: Fri Sep 24, 2004 12:09 pm    Post subject: Reply with quote

Thanks for that. I'll check it out in about half an hour.

The kernel I'm using is 2.6.
Back to top
View user's profile Send private message
cheater512
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2003
Posts: 145
Location: Australia

PostPosted: Fri Sep 24, 2004 1:39 pm    Post subject: Reply with quote

Thanks for that. I just decided to throw everything in to local.start. :wink:

Its a nasty hack but it works well. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum