diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 496a6a9..c1c6929 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -102,11 +102,26 @@ kdump_setup_vlan() { fi } +# setup s390 znet cmdline +# $1: netdev name +kdump_setup_znet() { + local _options="" + . /etc/sysconfig/network-scripts/ifcfg-$1 + for i in $OPTIONS; do + _options=${_options},$i + done + echo rd.znet=${NETTYPE},${SUBCHANNELS}${_options} > ${initdir}/etc/cmdline.d/30znet.conf +} + # Setup dracut to bringup a given network interface kdump_setup_netdev() { local _netdev=$1 local _static _proto + if [ "$(uname -m)" = "s390x" ]; then + kdump_setup_znet $_netdev + fi + _netmac=`ip addr show $_netdev 2>/dev/null|awk '/ether/{ print $2 }'` _static=$(kdump_static_ip $_netdev) if [ -n "$_static" ]; then diff --git a/mkdumprd b/mkdumprd index d1f7e15..81627c8 100644 --- a/mkdumprd +++ b/mkdumprd @@ -175,6 +175,10 @@ if [ -f "$keyfile" ]; then SSH_KEY_LOCATION=$(/usr/bin/readlink -m $keyfile) fi +if [ "$(uname -m)" = "s390x" ]; then + add_dracut_module "znet" +fi + while read config_opt config_val; do case "$config_opt" in