mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-20 17:32:15 +00:00
fix(install): leave the USB NIC of the BMC down on installed EL nodes
post.rhels8 turns on every NIC that has link during the installation. The USB NIC of a BMC host interface always has link, so the installed node starts DHCP on it at boot, gets no lease, and NetworkManager-wait-online fails. post.rhels8 now skips NICs bound to a USB class driver: cdc_ether, cdc_ncm, cdc_eem or rndis_host, which Linux binds to the USB gadget of a BMC. USB Ethernet adapters with their own driver, the other NICs with link, and NICs without a sysfs entry come up as before.
This commit is contained in:
@@ -12,6 +12,10 @@ if compgen -G "/etc/sysconfig/network-scripts/ifcfg-*" >/dev/null 2>&1; then
|
||||
do
|
||||
[ "${i##*/}" = "ifcfg-lo" ] && continue
|
||||
nicname="${i##*-}"
|
||||
# A BMC host interface uses a USB class driver and has link but usually no DHCP server.
|
||||
case "$(readlink -f "/sys/class/net/$nicname/device/driver" 2>/dev/null)" in
|
||||
*/cdc_ether|*/cdc_ncm|*/cdc_eem|*/rndis_host) continue ;;
|
||||
esac
|
||||
if ethtool "$nicname" 2>/dev/null | grep -E -i -q "Link detected.*yes" >/dev/null 2>&1
|
||||
then
|
||||
case "$XCATDEBUGMODE" in
|
||||
|
||||
Reference in New Issue
Block a user