LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Disabling modules at startup with SYS V Linux (https://www.linuxquestions.org/questions/linux-newbie-8/disabling-modules-at-startup-with-sys-v-linux-365996/)

harisund 09-22-2005 01:46 PM

Disabling modules at startup with SYS V Linux
 
Hello everyone

I am using Mepis, which is a Debian derivate and therefore uses Sys V style init scripts.

What I would like to know is how to disable / enable certain modules at startup time. One annoying module I would love to kill is the floppy module. Also, I would prefer my eth0 to be disabled (during boot time it always tries to aquire DHCP through eth0) and my wlan0 to be enabled (I have written a shell script which connects to the school network when I am at school and house network when I am there. I want this script to be run at boot time). The wlan0 ndiswrapper module gets loaded I think, since I said modprobe ndiswrapper. But I still have to run my shell script for it to acquire the DHCP address from the school / home routers. Oh, and the CUPS printer module is another annoying thing. Seriously.

I read in the Debian Reference about /etc/default, /etc/init.d and /etc/rcS.d and /etc/rc?.d (?-> runlevels). I also learnt that shell scripts with S are started and those with K are killed.

But before I go tinkering with those, I would be really grateful if someone could tell me what they are exactly, and how I can start customizing those?

Thank you very much

Regards
Hari

JamieBrown 09-22-2005 05:33 PM

Hi harisund!

Although I'm no Debian person (using Mandriva at the moment) I believe the command "chkconfig" works across distros. Log in as root, and type:

chkconfig --list

That will give you a list of all of the services you've got set up in your init.d section. Then you can just say:

chkconfig [servicename] off

to turn a service off. Conversely you can use "on" to turn it back on. But I'd be careful - some are very necessary of course! :)

Alternatively though - I'd investigate looking at your network setup to change the way your network devices work. In your network settings there'll be an option with each interface that allows you to specify whether or not you want to start it on boot.

Cheers,

Jamie.


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