diff --git a/elements/mellanox/install.d/65-mellanox b/elements/mellanox/install.d/65-mellanox new file mode 100755 index 00000000..4d545789 --- /dev/null +++ b/elements/mellanox/install.d/65-mellanox @@ -0,0 +1,9 @@ +#!/bin/bash +# Ensure we load the mellanox driver somehow + +set -e + +home=$(dirname $0) + +install -m 0644 -o root -g root $home/mellanox-rules.udev /etc/udev/rules.d/81-mellanox.rules +install -m 0644 -o root -g root $home/mellanox.modprobe /etc/modprobe.d/mellanox.conf diff --git a/elements/mellanox/install.d/mellanox-rules.udev b/elements/mellanox/install.d/mellanox-rules.udev new file mode 100644 index 00000000..eda32596 --- /dev/null +++ b/elements/mellanox/install.d/mellanox-rules.udev @@ -0,0 +1,6 @@ +ACTION!="add", GOTO="drivers_end" + +SUBSYSTEM=="net", RUN+="/sbin/modprobe mlx4_en" + +LABEL="drivers_end" + diff --git a/elements/mellanox/install.d/mellanox.modprobe b/elements/mellanox/install.d/mellanox.modprobe new file mode 100644 index 00000000..5b8480ca --- /dev/null +++ b/elements/mellanox/install.d/mellanox.modprobe @@ -0,0 +1,3 @@ +# /etc/modprobe.d/mellanox.conf +# Attempt to force the mellanox driver to be loaded +/sbin/modprobe mlx4_en