]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
net-lib.sh: support infiniband network mac addresses
authorThomas Blume <Thomas.Blume@suse.com>
Fri, 7 Aug 2020 06:39:26 +0000 (08:39 +0200)
committerDaniel Molkentin <daniel@molkentin.de>
Fri, 7 Aug 2020 10:00:59 +0000 (12:00 +0200)
Infiniband MAC addresses have 20 octets.

Reference: bsc#996146

modules.d/40network/net-lib.sh

index 7f185fddb509a3161b05b516e8b425e6d8e55f89..556d86b5301e350a6574fcdff47cbb8bfc056c69 100755 (executable)
@@ -570,6 +570,11 @@ parse_ifname_opts() {
             # udev requires MAC addresses to be lower case
             ifname_mac=$(echo $2:$3:$4:$5:$6:$7 | sed 'y/ABCDEF/abcdef/')
             ;;
+        21)
+            ifname_if=$1
+            # udev requires MAC addresses to be lower case
+            ifname_mac=$(echo $2:$3:$4:$5:$6:$7:$8:$9:${10}:${11}:${12}:${13}:${14}:${15}:${16}:${17}:${18}:${19}:${20}:${21} | sed 'y/ABCDEF/abcdef/')
+            ;;
         *)
             die "Invalid arguments for ifname="
             ;;