View previous topic :: View next topic |
Author |
Message |
cheater512 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 03 Nov 2003 Posts: 145 Location: Australia
|
Posted: Fri Sep 24, 2004 11:25 am Post subject: How do I make my Wireless LAN commands run on boot? |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
BiOCHiP n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 07 Jul 2002 Posts: 57 Location: Amsterdam
|
Posted: Fri Sep 24, 2004 11:36 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
cheater512 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 03 Nov 2003 Posts: 145 Location: Australia
|
Posted: Fri Sep 24, 2004 12:09 pm Post subject: |
|
|
Thanks for that. I'll check it out in about half an hour.
The kernel I'm using is 2.6. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cheater512 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 03 Nov 2003 Posts: 145 Location: Australia
|
Posted: Fri Sep 24, 2004 1:39 pm Post subject: |
|
|
Thanks for that. I just decided to throw everything in to local.start.
Its a nasty hack but it works well. ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|