2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-05 12:37:54 +00:00
Files
xcat-core/xCAT-genesis-scripts/usr/sbin/loadmlxeth
T
Vinícius Ferrão c6c7df99bd genimage: resolve Mellanox defaults from target kernel
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.
2026-08-28 12:48:17 -03:00

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}"