Merge "Fix ip -6 address netmask and workaround for multi-drivers-switch"
This commit is contained in:
commit
3d74a094b8
@ -1529,6 +1529,39 @@ done
|
||||
# Override installer variable to not prompt for erasing the disk
|
||||
export INSTW=0
|
||||
|
||||
# If multi-drivers-switch= is in boot parameters then we need to revert the
|
||||
# kernel modules to the legacy version. This is a workaround for the LAT
|
||||
# /install script not supporting multi-drivers-switch
|
||||
driver_version=
|
||||
if grep -s -q '\smulti-drivers-switch=' /proc/cmdline ; then
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case "${arg}" in
|
||||
multi-drivers-switch=*)
|
||||
driver_version=${arg##*=}
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# Only proceed if we have a valid driver_version
|
||||
if [ -n "${driver_version}" ] && \
|
||||
[ -f "/lib/modules/$(uname -r)/extra/ice-${driver_version}/ice.ko" ] && \
|
||||
[ -f "/lib/modules/$(uname -r)/extra/i40e-${driver_version}/i40e.ko" ] && \
|
||||
[ -f "/lib/modules/$(uname -r)/extra/iavf-${driver_version}/iavf.ko" ]; then
|
||||
ilog "Found multi-drivers-switch: replacing ice/i40e/iavf with driver_version='${driver_version}'"
|
||||
modprobe -r ice
|
||||
modprobe -r i40e
|
||||
modprobe -r iavf
|
||||
sleep 2
|
||||
insmod "/lib/modules/$(uname -r)/extra/ice-${driver_version}/ice.ko"
|
||||
insmod "/lib/modules/$(uname -r)/extra/i40e-${driver_version}/i40e.ko"
|
||||
insmod "/lib/modules/$(uname -r)/extra/iavf-${driver_version}/iavf.ko"
|
||||
sleep 2
|
||||
ilog "Finished multi-drivers-switch module replacement"
|
||||
else
|
||||
elog "Found multi-drivers-switch but no modules exist for driver_version='${driver_version}' (ignoring)"
|
||||
fi
|
||||
fi
|
||||
|
||||
ilog "Setting up initial IP address for ostree pull"
|
||||
parse_miniboot_network_params
|
||||
|
||||
@ -1542,8 +1575,14 @@ if [ -z "${mgmt_vlan}" ] ; then
|
||||
ilog "ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR}/${BOOTPARAM_PREFIX_LEN} dev ${mgmt_dev}"
|
||||
ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR}/${BOOTPARAM_PREFIX_LEN} dev ${mgmt_dev}
|
||||
else
|
||||
# BOOTPARAM_PREFIX_LEN should not be empty, but guard against it:
|
||||
if [ -z "${BOOTPARAM_PREFIX_LEN}" ]; then
|
||||
ilog "ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR} dev ${mgmt_dev}"
|
||||
ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR} dev ${mgmt_dev}
|
||||
else
|
||||
ilog "ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR}/${BOOTPARAM_PREFIX_LEN} dev ${mgmt_dev}"
|
||||
ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR}/${BOOTPARAM_PREFIX_LEN} dev ${mgmt_dev}
|
||||
fi
|
||||
fi
|
||||
ilog "ip ${BOOTPARAM_IP_VER} link set dev ${mgmt_dev} up"
|
||||
ip ${BOOTPARAM_IP_VER} link set dev ${mgmt_dev} up
|
||||
@ -1577,8 +1616,14 @@ else
|
||||
ilog "ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR}/${BOOTPARAM_PREFIX_LEN} dev ${mgmt_iface}"
|
||||
ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR}/${BOOTPARAM_PREFIX_LEN} dev ${mgmt_iface}
|
||||
else
|
||||
# BOOTPARAM_PREFIX_LEN should not be empty, but guard against it:
|
||||
if [ -z "${BOOTPARAM_PREFIX_LEN}" ]; then
|
||||
ilog "ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR} dev ${mgmt_iface}"
|
||||
ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR} dev ${mgmt_iface}
|
||||
else
|
||||
ilog "ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR}/${BOOTPARAM_PREFIX_LEN} dev ${mgmt_iface}"
|
||||
ip ${BOOTPARAM_IP_VER} address add ${BOOTPARAM_IP_ADDR}/${BOOTPARAM_PREFIX_LEN} dev ${mgmt_iface}
|
||||
fi
|
||||
fi
|
||||
ilog "ip ${BOOTPARAM_IP_VER} link set up dev ${mgmt_dev}"
|
||||
ip ${BOOTPARAM_IP_VER} link set up dev ${mgmt_dev}
|
||||
|
Loading…
Reference in New Issue
Block a user