From: Petr Tesarik Date: Thu Jun 29 18:11:52 2017 +0200 Subject: Activate QETH network devices References: bsc#1038669 Upstream: v0.8.17 Git-commit: 2288f2b56fec0298fdf21ff7a5dd03157d12242e Take care of activating QETH devices in the kdump environment, because dracut does not do it automatically. Signed-off-by: Petr Tesarik --- init/setup-kdump.functions | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) --- a/init/setup-kdump.functions +++ b/init/setup-kdump.functions @@ -457,6 +457,7 @@ function kdump_vlan_config() # { # kdump_netif corresponding ifname= initrd parameter added # kdump_iface device name in initrd # kdump_kmods additional kernel modules updated +# kdump_hwif hardware interfaces updated function kdump_ifname_config() # {{{ { kdump_iface="$1" @@ -464,6 +465,8 @@ function kdump_ifname_config() # if [ -z "$ifkind" ] then + kdump_hwif="$kdump_hwif $kdump_iface" + local hwaddr local addrtype=$(<"/sys/class/net/$kdump_iface/addr_assign_type") if [ "$addrtype" -eq 0 ] @@ -1038,6 +1041,69 @@ function kdump_filter_sysctl() # } # }}} # +# Set up a QETH network interface +# Parameters: +# 1) _root: initrd temporary root +# 2) _iface: interface name +# Input variables: +# kdump_hwif hardware network interfaces +function kdump_setup_qeth() # {{{ +{ + local _root="$1" + local _iface="$2" + local _dev=$( readlink "/sys/class/net/$_iface/device" ) + _dev="${_dev##*/}" + local _cdev0=$( readlink "/sys/class/net/$_iface/device/cdev0" ) + _cdev0="${_cdev0##*/}" + local _cdev1=$( readlink "/sys/class/net/$_iface/device/cdev1" ) + _cdev1="${_cdev1##*/}" + local _cdev2=$( readlink "/sys/class/net/$_iface/device/cdev2" ) + _cdev2="${_cdev2##*/}" + local _layer2=$("${_root}/etc/udev/rules.d/51-qeth-${_dev}.rules" <