Loading module before Network Configuring

Mark Roach mrroach at okmaybe.com
Wed Feb 16 16:15:56 UTC 2005


On Wed, 2005-02-16 at 08:11 -0500, Nano wrote:
>Noah Dain Wrote: 
>> On Tue, 15 Feb 2005 21:47:07 +0100, "Mariano F.co Bentez Mulet"

>> > Here is what I have to type to make it work:
>> > 
>> > insmod /lib/modules/2.6.10-2-386/kernel/drivers/char/acerhk.ko
>> > echo 1 > /proc/driver/acerhk/wirelessled
>> > 
>> > Is there a way this can be done without having to type it or to
>> execute
>> > it after gnome is loaded?
>> 
>> you can also define actions to be executed before and after bring an
>> interface up or down
>> 
>> see 'man interfaces', look for 'up', 'pre-up', 'down', and 'post-down'

>Thanks, but what this does is just to turn a led on, which is
>necessary.
>Is it just possible to execute that order in the boot sequence?

Did you try doing what he suggested? In your /etc/network/interfaces
file you should have something like:

iface eth0 inet dhcp
    pre-up sh -c "echo 1 > /proc/driver/acerhk/wirelessled"

This will run the command before bringing up your network card, which is
what you asked for isn't it? If it must occur at some other point, what
I do is:

cat > /etc/init.d/local.sh << EOF
#!/bin/sh

echo 1 > /proc/driver/acerhk/wirelessled

: exit 0
EOF

ln -s /etc/init.d/local.sh /etc/rcS.d/SXXlocal.sh

(where XX is the position you want within the other startup files)

-mark







More information about the ubuntu-users mailing list