LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   What do I have to edit to make a module start on boot? (https://www.linuxquestions.org/questions/linux-wireless-networking-41/what-do-i-have-to-edit-to-make-a-module-start-on-boot-183941/)

WopMaster8 05-20-2004 09:40 PM

What do I have to edit to make a module start on boot?
 
Here's a :newbie: question for you guys:

After playing with the ndiswrapper all day I finally got it to work. The only problem is, every time I boot I have to activate the module and establish an IP. What a pain. After boot and login I have to type:

modprobe ndiswrapper

iwconfig wlan0 key s:XXXXX

dhcpcd wlan0

When I set the WEP key for my router my ESSID and all the other settings are automatically set, which is nice because I've been browsing the forums and seeing a lot of people having problems setting the specs for these things. Anyway, are there files that I can edit which will activate the ndiswrapper and set up the WEP key before the DHCP broadcast is sent so everything is automatic? I'm using Slackware 9.1 with the 2.4.22 kernel by the way. Also, I'm going to try updating to the 2.6.6 kernel soon. Am I going to have to do all this over and is updating the kernel a good idea in the first place?

Thanks everyone.

ppuru 05-21-2004 01:12 AM

put it in one of the rc scripts...

WopMaster8 05-21-2004 02:07 AM

I thought I implied that I'm pretty new to this but even so I would think that there would be a certain rc file that I needed to edit (and a certain location somewhere before the DHCP search). And I don't really want my WEP key sitting in some file unprotected, plus "ndiswrapper -m" is supposed to save that setting so I don't have to put it in the rc file in the first place. But it looks like that didn't work for some reason. I'm still confused as to what to do exactly, but thanks for the help so far.

Biogenesis 05-21-2004 07:31 AM

I would only recommend upgrading the kenel if:

1) Something that doesn't work right now works in the later kernel
2) Your bored and have a free few hours

After saying that though going from 2.4 to 2.6 gives you an array of inprovements like pre-emptivness and the new process scheduler, that and it can be quite educational to compile your own kernel. There'd be a fair few help threads around here somewhere...i think.

Now, I haven't used slackware for a while but i know that putting those commands you specified in /etc/rc.d/rc.local (ie just type them literally at the end of that file with a newline between each) and they will be run last thing just before you get a login prompt. Unfortunatly i don't know how you can do it without having the WEP key sitting there as plaintext. I guess the easiest thing would be to simply remove the read permission for the file like so:

chmod 700 /etc/rc.d/rc.local

That command will set the permissions so that root can read, write and execute the file but no other user can (assuming the file is owned by root, which it should be. If it isn'n you can make it so by running "chown root /etc/rc.d/rc.local").

DavidPhillips 05-21-2004 09:44 PM

You should be able to create a file /etc/rc.d/rc.modules

then add the modprobe commands there. The default rc scripts will run the file if it's there. Be sure to chmod it to set the x bit.

motub 05-23-2004 10:25 AM

What I would do is put ndiswrapper -m in one of the following locations:

1) The session manager for my desktop environment;

2) The initialization file for my display manager;

or I would read The Slackware Linux Essentials online book and see if

3) /etc/rc.d/rc.inet2 might not be the appropriate file to place this instruction in, given that the Book says
Quote:

The /etc/rc.d/rc.inet2 file is there for the other part of networking: setting up services and daemons and handling any interesting networking options.
.

I don't have Slack installed, so I can't check this myself, but that file does seem to be a good place to start.

Hope this helps.


All times are GMT -5. The time now is 10:58 PM.