From d284597dadee9ae93d52530bbb6f43cf3ff3ff9c Mon Sep 17 00:00:00 2001 From: WANG Siyuan Date: Mon, 13 Feb 2017 09:39:59 +0800 Subject: [PATCH] udev rules: Add InfiniBand support ATTR{type} 1 means ARPHRD_ETHER, 32 means ARPHRD_INFINIBAND. InfiniBand is supported in BIOS name, so add udev rules support. --- biosdevname.rules.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/biosdevname.rules.in b/biosdevname.rules.in index 0a32aa5..21e56d4 100644 --- a/biosdevname.rules.in +++ b/biosdevname.rules.in @@ -1,7 +1,10 @@ SUBSYSTEM!="net", GOTO="netdevicename_end" ACTION!="add", GOTO="netdevicename_end" NAME=="?*", GOTO="netdevicename_end" -ATTR{type}!="1", GOTO="netdevicename_end" +ENV{SUPPORT}="0" +ATTR{type}=="1", ENV{SUPPORT}="1" +ATTR{type}=="32", ENV{SUPPORT}="1" +ENV{SUPPORT}=="0" GOTO="netdevicename_end" ENV{DEVTYPE}=="?*", GOTO="netdevicename_end" # kernel command line "biosdevname={0|1}" can turn off/on biosdevname