[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#488267: Should add hostap modules



Frans Pop wrote:
Sorry, I'm a moron.

Well, I don't think you're a moron. But then, I don't think I'm a moron either, so maybe my judgement is impaired!

The correct line should be:
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=="1", NAME="eth1"

Change the second line to that and remove the third line. (Or remove the
second line and change wlan0 to eth1 in the third; same difference :-)

Yes, yes, yes, that's exactly what I did (unless I'm very much mistaken).
I'm sorry if my long posts cause confusion.
Here's a transcript - nothing omitted except mechanics of editing:

obelix:~# ls /sys/class/net/
eth0  lo  wifi0  wlan0
obelix:~# cat /etc/udev/rules.d/z25_persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x8086:0x1031 (e100)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="08:00:46:77:ce:be", NAME="eth0"

# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=1, NAME="eth1"


# PCI device 0x1260:0x3873 (hostap_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=="1", NAME="wlan0"
obelix:~# vi /etc/udev/rules.d/z25_persistent-net.rules
obelix:~# cat /etc/udev/rules.d/z25_persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x8086:0x1031 (e100)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="08:00:46:77:ce:be", NAME="eth0"

# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=1, NAME="eth1"

obelix:~# modprobe -r hostap_pci
obelix:~# ls /sys/class/net/
eth0  lo
obelix:~# cat /etc/udev/rules.d/z25_persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x8086:0x1031 (e100)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="08:00:46:77:ce:be", NAME="eth0"

# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=1, NAME="eth1"

obelix:~# modprobe hostap_pci
obelix:~# ls /sys/class/net/
eth0  lo  wifi0  wlan0
obelix:~# cat /etc/udev/rules.d/z25_persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x8086:0x1031 (e100)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="08:00:46:77:ce:be", NAME="eth0"

# PCI device 0x1260:0x3873 (orinoco_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=1, NAME="eth1"


# PCI device 0x1260:0x3873 (hostap_pci)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:d0:59:bd:d5:c5", ATTR{type}=="1", NAME="wlan0"
obelix:~#

The line with eth1 is having no effect whatsoever. The line with wlan0 is being inserted by the command modprobe hostap_pci, nothing else.

No. *Any* renaming is done by udev and only by udev.

Well, if you say so.
But I can rename interfaces (as root) without using udev, so if I can I presume a systems program can too:

obelix:~# ls /sys/class/net/
eth0  lo  wifi0  wlan0
obelix:~# obelix:~# ifrename -i wlan0 -n eth3
Error: Can't open configuration file `/etc/iftab': No such file or directory
obelix:~# touch /etc/iftab
obelix:~# ifrename -i wlan0 -n eth3
eth3
obelix:~# ls /sys/class/net/
eth0  eth3  lo	wifi0
obelix:~#

Cheers,

Barry







Reply to: