]> git.openfabrics.org - ~emulex/for-vlad/old/compat-rdma.git/commitdiff
Fixed ipoib interfaces alias ib* -> netdev-ib* ofed_3_12_1
authorVladimir Sokolovsky <vlad@mellanox.com>
Tue, 23 Dec 2014 12:27:50 +0000 (14:27 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Tue, 23 Dec 2014 12:44:43 +0000 (14:44 +0200)
This is to avoid the warning below:
Loading kernel module for a network device with CAP_SYS_MODULE
(deprecated).  Use CAP_NET_ADMIN and alias netdev-ib0 instead

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
compat-rdma.spec
ofed_scripts/ib_ipoib.conf

index fc47b53956fffdc0d555053cc5a17e714a04d54f..c973aaf84059b63ebc4d7faffc527c1759dc814e 100755 (executable)
@@ -303,29 +303,6 @@ rm -rf $RPM_BUILD_DIR/%{_name}-%{_version}
 
 %post
 if [ $1 -ge 1 ]; then # 1 : This package is being installed or reinstalled
-count_ib_ports()
-{
-    local cnt=0
-    local tmp_cnt=0
-    
-    tmp_cnt=$(/sbin/lspci -n | grep "15b3:" | wc -l | tr -d '[:space:]') # Mellanox HCAs
-    cnt=$[ $cnt + 2*${tmp_cnt} ]
-    
-    tmp_cnt=$(/sbin/lspci -n | grep -E "1fc1:|1077:7220" | wc -l | tr -d '[:space:]') # QLogic SDR and DDR HCA
-    cnt=$[ $cnt + ${tmp_cnt} ]
-    
-    tmp_cnt=$(/sbin/lspci -n | grep -E "1077:7322" | wc -l | tr -d '[:space:]') # QLogic QDR HCA
-    cnt=$[ $cnt + 2*${tmp_cnt} ]
-    return $cnt
-}
-
-count_ib_ports
-ports_num=$?
-
-# Set default number of ports to 2 if no HCAs found
-if [ $ports_num -eq 0 ]; then
-    ports_num=2
-fi    
 #############################################################################################################
 #                                       Modules configuration                                               #
 #############################################################################################################
@@ -347,17 +324,6 @@ EOF
     fi
 %endif
 
-%if %{modprobe_update}
-%if %{build_ipoib}
-for (( i=0 ; i < $ports_num ; i++ ))
-do
-cat >> /etc/modprobe.d/ib_ipoib.conf << EOF
-alias ib${i} ib_ipoib
-EOF
-done
-%endif
-%endif
-
     /sbin/depmod %{KVERSION}
 
 #############################################################################################################
index 3f418064687f20e276b2cc6075aee56c21b71ae9..8439d8ea60745a56027e1f295f19766cee0ac1dd 100644 (file)
@@ -1,2 +1 @@
-# install ib_ipoib modprobe --ignore-install ib_ipoib && /sbin/ib_ipoib_sysctl load
-# remove ib_ipoib /sbin/ib_ipoib_sysctl unload ; modprobe -r --ignore-remove ib_ipoib
+alias netdev-ib* ib_ipoib