From e45a51c9950776fc7b58c2ba87f4740fd5ba53ac Mon Sep 17 00:00:00 2001 From: Coiby Xu Date: Jun 30 2021 02:26:28 +0000 Subject: fix format issue in find_online_znet_device Related: bz1977543 Upstream: Fedora Conflict: None commit ad6f60d70df5306380c83fd1ebbd0a637ef993f1 Author: Coiby Xu Date: Mon Jun 28 18:37:11 2021 +0800 fix format issue in find_online_znet_device Change spaces to tab to fix alignment issue. Fixes: commit 7d472515688fb330eee76dac1c39ae628398f757 ("Iterate /sys/bus/ccwgroup/devices to tell if we should set up rd.znet") Signed-off-by: Coiby Xu Acked-by: Kairui Song Signed-off-by: Coiby Xu --- diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index fc62060..848b205 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -465,29 +465,29 @@ kdump_setup_vlan() { # code reaped from the list_configured function of # https://github.com/hreinecke/s390-tools/blob/master/zconf/znetconf find_online_znet_device() { - local CCWGROUPBUS_DEVICEDIR="/sys/bus/ccwgroup/devices" - local NETWORK_DEVICES d ifname ONLINE + local CCWGROUPBUS_DEVICEDIR="/sys/bus/ccwgroup/devices" + local NETWORK_DEVICES d ifname ONLINE [ ! -d "$CCWGROUPBUS_DEVICEDIR" ] && return - NETWORK_DEVICES=$(find $CCWGROUPBUS_DEVICEDIR) + NETWORK_DEVICES=$(find $CCWGROUPBUS_DEVICEDIR) for d in $NETWORK_DEVICES do - read ONLINE < $d/online - if [ $ONLINE -ne 1 ]; then - continue - fi - # determine interface name, if there (only for qeth and if - # device is online) - if [ -f $d/if_name ] - then - read ifname < $d/if_name - elif [ -d $d/net ] - then - ifname=$(ls $d/net/) - fi - [ -n "$ifname" ] && break - done - echo -n "$ifname" + read ONLINE < $d/online + if [ $ONLINE -ne 1 ]; then + continue + fi + # determine interface name, if there (only for qeth and if + # device is online) + if [ -f $d/if_name ] + then + read ifname < $d/if_name + elif [ -d $d/net ] + then + ifname=$(ls $d/net/) + fi + [ -n "$ifname" ] && break + done + echo -n "$ifname" } # setup s390 znet cmdline