You are not logged in.

#1 2004-04-26 17:46:03

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

boot: MODULES, DAEMONS, INTERFACES - idea

since i use now an addionally wireless device to connect to other LAN, here some idea for boot options i think can be usefull:

i dont know how to realize them myself and maybe they already exist, then sorry that i didnt know how to use them

1)     how to tell before boot (in lilo "boot:") the system (not) to load a module? (edit MODULES on the run)

-> it would be great to pass e.g. "M:!orinoco_pci" as variable to tell the boot script to use "!orinoco_pci" instead of "orinoco_pci" but leaving all other modules as they are (or if module do not exist, to simply add it to the list)

2)    more or less the same with the DAEMONS

3)     more or less the same with the INTERFACES


my idea is to change the init-scripts to interpret "M:$module" "D:$daemon" and "I:$interface" to edit MODULES, DAEMONS and INTERFACES on the fly

any chance to get this? any idea how to do this already (without typing the whole line of modules, daemons or interfaces in "boot:")

what do you think?


The impossible missions are the only ones which succeed.

Offline

#2 2004-04-26 18:22:02

wdemoss
Member
From: WV - USA
Registered: 2004-01-18
Posts: 222

Re: boot: MODULES, DAEMONS, INTERFACES - idea

For the wireless network switching problems check out quickswitch http://muthanna.com/quickswitch. Its in extra.


Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?

Offline

#3 2004-04-26 19:56:36

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: boot: MODULES, DAEMONS, INTERFACES - idea

wdemoss wrote:

For the wireless network switching problems check out quickswitch http://muthanna.com/quickswitch. Its in extra.

thanx a lot . didnt know that such thing exist - with this tool, half of my needs are solved, great!

the other thing is:
if the wireless-module (orinoco_pci) loads always at startup, my battery has about 20% less time to run, that's why i have each time to load it manually or rmmod it if loaded automatically ... is there a way to handle modprobe/rmmod also with quickswitch or something else? (i had a look at the mans, but didnt found such thing)

any chance to shut down eth0 when eth2 is up? (or switch back - either/or - easily (modprobe one rmmod two <-> modprobe two rmmod one))

btw: quickswitch pkg has it's config example under /usr/etc/quickswitch instead of /etc/quickswitch  ---  is this intentionally?


The impossible missions are the only ones which succeed.

Offline

#4 2004-04-26 20:53:09

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: boot: MODULES, DAEMONS, INTERFACES - idea

You could try to disable the wireless card with changing some value in /proc or /sys, but if rmmod works then that's easier and probably better. I would make a simple script that executes modprobe/rmmod and quickswitch with the right parameters (well, I would make a tiny C program instead of a script, so that it can be setuid, but you can use sudo instead).

Offline

#5 2004-04-26 21:12:54

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: boot: MODULES, DAEMONS, INTERFACES - idea

till now, i used a script to switch the 3 profiles i need ... but i wondered why it is not possible to somehow tell the init-scripts to modify MODULES or/and INTERFACES, so that the handling is less complicated when the machine runs already (rmmod modprobe ... takes about 40seconds to run in combination and it beeps 4 times - and the bootup with the module not needed costs also some seconds)

i know these are all details, and all is working (now even better with quickswitch big_smile ) but i wondered about this on-the-fly modification of MODULES or INTERFACES or DAEMONS at boot-time

[what can be done, is to give the whole MODULES=() line as kernel parameter in lilo, that is then passed on to the rc.conf, because there are no MODULES in kernel, but typing the whole line is more pain]


The impossible missions are the only ones which succeed.

Offline

#6 2004-04-27 00:17:43

wdemoss
Member
From: WV - USA
Registered: 2004-01-18
Posts: 222

Re: boot: MODULES, DAEMONS, INTERFACES - idea

I'm not super knowledgable about how the modprobe.conf works, but could you just alias the interface to the module, so it's not loaded until its accessed? Like mine, i have (i think: i'm away from my computer right now)

alias eth0 tg3
alias wlan0 ndiswrapper


Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?

Offline

#7 2004-04-27 00:44:33

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: boot: MODULES, DAEMONS, INTERFACES - idea

they are both in modprobe.conf (eth0 and eth2 - eth1 is firewire), but the trouble is, that if they are not used, they load anyway (if both  in INTERFACES)

if both (eth0 + eth2) are in INTERFACES both modules are linking at boot

if only one, then, when i want to use the other, i have to do it by "hand"

-> either i need to specify somehow INTERFACES or MODULES before bootup - that's why i started this discussion

thanx for the suggestions - now, i wrote it in much better english, what my idea was


The impossible missions are the only ones which succeed.

Offline

#8 2004-04-27 02:56:27

wdemoss
Member
From: WV - USA
Registered: 2004-01-18
Posts: 222

Re: boot: MODULES, DAEMONS, INTERFACES - idea

dp wrote:

they are both in modprobe.conf (eth0 and eth2 - eth1 is firewire), but the trouble is, that if they are not used, they load anyway (if both  in INTERFACES)

Sorry for my confusion. I only load the loopback interface in INTERFACES. I use ifplugd for eth0 and quick switch for my wireless networks.

dp wrote:

if only one, then, when i want to use the other, i have to do it by "hand"

I was under the impression that if the module was specified in modprobe.conf, that the first time that interface was access, the module would be loaded. So, for instance, the module for ndiswrapper that i use for wireless isn't loaded at boot, but as soon as I bring up that interface, the module is first loaded.

-wd


Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?

Offline

#9 2004-04-27 10:18:28

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: boot: MODULES, DAEMONS, INTERFACES - idea

wdemoss wrote:
dp wrote:

they are both in modprobe.conf (eth0 and eth2 - eth1 is firewire), but the trouble is, that if they are not used, they load anyway (if both  in INTERFACES)

Sorry for my confusion. I only load the loopback interface in INTERFACES. I use ifplugd for eth0 and quick switch for my wireless networks.

sorry for bringing confusion here - i'm sometimes not really clear in explaining things - especially if in foreign language

wdemoss wrote:
dp wrote:

if only one, then, when i want to use the other, i have to do it by "hand"

I was under the impression that if the module was specified in modprobe.conf, that the first time that interface was access, the module would be loaded. So, for instance, the module for ndiswrapper that i use for wireless isn't loaded at boot, but as soon as I bring up that interface, the module is first loaded.

exactly, but if you bring an interface down, the module do not rmmod automagically - that's where the trouble starts in making it automatically

if i e.g. go from wireless to wired, i do:

ifconfig eth2 down
ifconfig eth0 up

what brings me eth0 working, but the wireless module stays loaded and wireless device consumes power from battery - then i need to rmmod -f orinoco_pci to remove it definitely


ifplugd is a great alternative, but often fails running on some lan's i use (unfortunately) - maybe it's also the chipset that sometimes do not report the status correctly i think

thanx


The impossible missions are the only ones which succeed.

Offline

#10 2004-04-27 12:38:48

wdemoss
Member
From: WV - USA
Registered: 2004-01-18
Posts: 222

Re: boot: MODULES, DAEMONS, INTERFACES - idea

dp wrote:

exactly, but if you bring an interface down, the module do not rmmod automagically - that's where the trouble starts in making it automatically

if i e.g. go from wireless to wired, i do:

ifconfig eth2 down
ifconfig eth0 up

Perhaps you could accomplish the unloading of module when switching (if your using quickswitch) with the execpre or execpost parmaeters in the conf file for a profile.

for eth0
[eth0]
execpre=if lsmod | grep 'orinoco_pci' 1>/dev/null 2>&1; then rmmod -f orinoco_pci fi

would that do what you want it to?
-wd


Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?

Offline

#11 2004-04-27 14:19:54

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,378
Website

Re: boot: MODULES, DAEMONS, INTERFACES - idea

wdemoss wrote:
dp wrote:

exactly, but if you bring an interface down, the module do not rmmod automagically - that's where the trouble starts in making it automatically

if i e.g. go from wireless to wired, i do:

ifconfig eth2 down
ifconfig eth0 up

Perhaps you could accomplish the unloading of module when switching (if your using quickswitch) with the execpre or execpost parmaeters in the conf file for a profile.

for eth0
[eth0]
execpre=if lsmod | grep 'orinoco_pci' 1>/dev/null 2>&1 then rmmod -f orinoco_pci fi

would that do what you want it to?
-wd

this is the direction i will go --- the execpre/-post are something i didnt had the idea of using for something like this - had tried quickswitch only for short

many thanx giving the idea


The impossible missions are the only ones which succeed.

Offline

Board footer

Powered by FluxBB