Bug#815819: sysconfig-hardware udev rule ignores INTERFACE_NAME property
Package: sysconfig-hardware
Version: 0.0.11
Severity: normal
X-Debbugs-CC: brueckner@linux.vnet.ibm.com,mihajlov@linux.vnet.ibm.com
I wanted to change the network interface name without using a custom
udev rule like 70-persistent-net.rules.
To do that, In Debian 8, I created a network interface hardware config
file (/etc/sysconfig/hardware/config-ccw-0.0.xxxx) with the following
content:
CCWGROUP_CHANS=(0.0.xxxx 0.0.xxxy 0.0.xxxz)
QETH_PORTNAME=OSAPORT
QETH_PORTNO=0
QETH_OPTIONS=(layer2)
INTERFACE_NAME=ethfoo
The interface is created and is up. However the name of the
interface remains enccw0.0.xxxx
I did a little debug and verified that the udev rule in the file /lib/udev/rules.d/65-sysconfig-hardware-net.rules was wrong:
It had:
SUBSYSTEM=="net", IMPORT{program}="/etc/sysconfig/scripts/hardware/udev-net $DEVPATH"
SUBSYSTEM=="net", ENV{INTERFACE_NAME}=="?*", NAME="$env{INTERFACE_NAME}"
But the correct would be:
SUBSYSTEM=="net", IMPORT{program}="/etc/sysconfig/scripts/hardware/udev-net $env{DEVPATH}"
SUBSYSTEM=="net", ENV{INTERFACE_NAME}=="?*", NAME="$env{INTERFACE_NAME}"
I tested the correction locally, and it worked.
I'm sure this problem also affects 0.0.12, since I took a look at the code.
Reply to: