From 7148c0a30dfc48221eadf255e8a89619f98a8752 Mon Sep 17 00:00:00 2001 From: "dyoung@redhat.com" Date: Fri, 22 Jun 2012 14:50:40 +0800 Subject: [PATCH] add s390x netdev setup s390x netdev need special cmdline to bring up parse the ifcfg file to append proper cmdline, also add znet dracut module Signed-off-by: Dave Young Acked-by: Vivek Goyal --- dracut-module-setup.sh | 15 +++++++++++++++ mkdumprd | 4 ++++ 2 files changed, 19 insertions(+) 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