[Prism54-users] using Hotplug to set Params for Prism54?
mobil@hegner-online.de
mobil@hegner-online.de
Fri, 23 Apr 2004 14:42:01 +0200
Hi there,
I'm just trying to pass on Network-Params to my Prism54-card using
Hotplug. I found this hint on a Gentoo-Forum (I'm using Gentoo on this
machine) ... but I can't get this to work. What I want: Use Hotplug to
set ESSID and WEP-Key.
I created a script /etc/hotplug/pci/prism54 (mod 755):
#!/bin/bash
if [ "${PCI_CLASS}" == "28000" ] && [ "${PCI_ID}" == "1260:3890" ]
then
iwconfig eth0 mode Managed
iwconfig eth0 enc `cat /etc/conf.d/WEP-Key`
iwconfig eth0 essid `cat /etc/conf.d/ESSID`
sleep 2
/etc/init.d/net.eth0 restart
fi
Then I placed the ESSID and WEP Data in /etc/conf.d/WEP-Key and
/etc/conf.d/ESSID
What works:
- if I start Hotplug the script is called multiple times, probably for
each detected PCI device.
- if I copy the lines between "then" and "fi" somewhere else and execute
this, the card is setup properly.
But the variables regarding PCI_CLASS and PCI_ID seem to be empty. If I
insert:
echo PCI Class: ${PCI_CLASS}
echo PCI ID: ${PCI_ID}
at the beginning of the script, I get a value of "0". Moreover, I get
confused because lspci -vn tells me:
00:0b.0 Class 0280: 1260:3890 (rev 01)
Subsystem: 16a5:1605
Flags: bus master, medium devsel, latency 80, IRQ 15
Memory at d9800000 (32-bit, non-prefetchable) [size=8K]
Capabilities: [dc] Power Management version 1
Here I get Class "0280" instead of "28000". But I seem to be to stupid
to get this debugged. Any hints as to how to get this to fly are
welcome.
Thanks!
Stefan.