diskimage-builder/elements/mellanox/install.d/65-mellanox
Noam Angel 07e34f90e7 Fix mellanox element required kernel modules and user space packages
This fix add need kernel module for Infiniband and ConnectX-4+ network
cards.
Also install by default required user space packages.
Change-Id: Ia2e7b1820f197778138a23fafaccb5a4fb44369a
2016-09-11 11:40:20 +00:00

22 lines
542 B
Bash
Executable File

#!/bin/bash
# Ensure we load the mellanox driver somehow
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
home=$(dirname $0)
install -m 0644 -o root -g root $home/mellanox-rules.udev /etc/udev/rules.d/81-mellanox.rules
# needed kernel modules; mlx4_en mlx4_ib ib_ipoib mlx5_ib ib_umad ib_uverbs
# mlx5_core loaded by mlx5_ib
echo "mlx4_en" >>/etc/modules
echo "mlx4_ib" >>/etc/modules
echo "ib_ipoib" >>/etc/modules
echo "mlx5_ib" >>/etc/modules
echo "ib_umad" >>/etc/modules
echo "ib_uverbs" >>/etc/modules