[ALUG] Laptop wifi help - need to automate dhclient

Mark Rogers mark at quarella.co.uk
Thu Nov 23 14:59:35 GMT 2006


Adam Bower wrote:
> Try adding the lines
>
> auto eth1
> iface eth1 inet dhcp 
>
> to /etc/network/interfaces

Those lines were already there.

Looking at the output from "ps" after I plug the device in, dhclient
appears to be running - maybe it's too soon?

Playing some more, what seems to be necessary (and works if I create a
shell script) is
    sudo iwconfig eth1 essid MYSSID
    sudo iwconfig eth1 enc MYWEPKEY
    sudo dhclient eth1

I can then unplug the USB device, plug it in, run the script, and I'm
away. Note that the essid and wep (hex) key are also in
/etc/network/interfaces. I don't seem to need any significant delay
between plugging in the dongle and running the script, and the script
runs pretty much instantly, whereas when I try changing any of the wlan
settings through the KDE network config it takes a long time to apply
any changes (about a minute?), as if its waiting for dhclient to timeout.

MJ Ray wrote:
> Alternatively:
>
> If it's running Udev, maybe try adding
> KERNEL=="eth1", RUN+="dhclient eth1"
> to the udev rules file.
>   

For the time being I'm going to stop experimenting in case I break
something which is "good enough" but I want to understand a bit more
about how this all fits together - I'll no doubt get chance to try all
this again soon....

I'm pretty sure Kubuntu 6.10 uses udev, but how do I check? Where's the
rules file?

> If it's hotplug, maybe try adding to /etc/hotplug/net.agent
>   

All I have under /etc/hotplug is a logitech mouse driver, although I
suspect hotplug is relevant for a removable WLAN connection like this?

> If it's running ModuleInitTools [...]

How do I tell?

[I really should know more about this stuff, although I reckon I've
learnt a hell of a lot in the last few days.]

> Hope it works.

Me too!!

-- 
Mark Rogers
More Solutions Ltd :: 0845 45 89 555





More information about the main mailing list