From ce0305d4f95cf00535d00a887c9a1d2323159b0b Mon Sep 17 00:00:00 2001 From: Lianbo Jiang Date: Wed, 15 Apr 2020 17:23:59 +0800 Subject: [PATCH] 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 Acked-by: Kairui Song --- dracut-module-setup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 024e333..5397eb5 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -318,13 +318,14 @@ kdump_setup_vlan() { # $1: netdev name kdump_setup_znet() { local _options="" + local _netdev=$1 - source_ifcfg_file $1 + source_ifcfg_file $_netdev for i in $OPTIONS; do _options=${_options},$i 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()