mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-04 20:17:55 +00:00
c6c7df99bd
Resolve optional Mellanox network drivers against the target image's selected kernel. Keep real mlx_en modules, fall back to mlx4_en, include available mlx5_core, and omit missing defaults without changing explicitly requested netdrivers.
13 lines
262 B
Bash
Executable File
13 lines
262 B
Bash
Executable File
#!/bin/sh
|
|
|
|
load_mellanox_ethernet()
|
|
{
|
|
xcat_modprobe=$1
|
|
xcat_mlx_status=1
|
|
"$xcat_modprobe" mlx4_en && xcat_mlx_status=0
|
|
"$xcat_modprobe" mlx5_core && xcat_mlx_status=0
|
|
return "$xcat_mlx_status"
|
|
}
|
|
|
|
load_mellanox_ethernet "${1:-/sbin/modprobe}"
|