mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-28 02:25:18 +03:00
Handle upper case MAC addresses in ifname option
While the documentation states that ifname MAC addresses must be lower case, we silently accept upper case ones and fail later on when udev doesn't rename the device. Instead of adding sanity checking on the MAC address just convert it to lower case and remove the requirement completely.
This commit is contained in:
parent
2e7b661681
commit
acfab3733f
@ -464,7 +464,6 @@ This parameter can be specified multiple times.</para>
|
||||
<term><envar>ifname=</envar><replaceable><interface></replaceable>:<replaceable><MAC></replaceable></term>
|
||||
<listitem>
|
||||
<para>Assign network device name <interface> (ie eth0) to the NIC with MAC <MAC>.
|
||||
Note letters in the MAC-address must be lowercase!
|
||||
<remark>Note: If you use this option you <emphasis remap="B">must</emphasis> specify an ifname= argument for all interfaces used in ip= or fcoe= arguments.</remark>
|
||||
This parameter can be specified multiple times.</para>
|
||||
</listitem>
|
||||
|
@ -25,7 +25,8 @@ parse_ifname_opts() {
|
||||
case $# in
|
||||
7)
|
||||
ifname_if=$1
|
||||
ifname_mac=$2:$3:$4:$5:$6:$7
|
||||
# udev requires MAC addresses to be lower case
|
||||
ifname_mac=`echo $2:$3:$4:$5:$6:$7 | tr '[:upper:]' '[:lower:]'`
|
||||
;;
|
||||
*)
|
||||
die "Invalid arguments for ifname="
|
||||
|
Loading…
Reference in New Issue
Block a user