Add a new option 'rd.znet_ifname' in order to use it in udev rules

In most cases, it always provides a persistent MAC address. But for
the s390 Arch, sometimes, kernel could run in the LPAR mode and it
doesn't provide a persistent MAC address, which caused the kdump
failure.

Currently, some rules rely on the persistent MAC address, for the
above case, which won't work in kdump kernel because non-persistent
MAC could not match with udev rules.

To fix this issue, need to add a new option 'rd.znet_ifname' in order
to provide extra parameters such as 'ifname' and 'subchannels' for
some rules, which ensures kdump can also work appropriately without
the persistent MAC. Please refer to the following commit in dracut:

872eb69936bd ("95znet: Add a rd.znet_ifname= option")

Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Lianbo Jiang 2020-04-15 17:23:59 +08:00 committed by Kairui Song
parent 74081a2b64
commit ce0305d4f9

View File

@ -318,13 +318,14 @@ kdump_setup_vlan() {
# $1: netdev name # $1: netdev name
kdump_setup_znet() { kdump_setup_znet() {
local _options="" local _options=""
local _netdev=$1
source_ifcfg_file $1 source_ifcfg_file $_netdev
for i in $OPTIONS; do for i in $OPTIONS; do
_options=${_options},$i _options=${_options},$i
done done
echo rd.znet=${NETTYPE},${SUBCHANNELS}${_options} > ${initdir}/etc/cmdline.d/30znet.conf echo rd.znet=${NETTYPE},${SUBCHANNELS}${_options} rd.znet_ifname=$_netdev:${SUBCHANNELS} > ${initdir}/etc/cmdline.d/30znet.conf
} }
kdump_get_ip_route() kdump_get_ip_route()