diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 9cbb5d6..e250703 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -303,6 +303,10 @@ kdump_get_perm_addr() { fi } +_get_nic_driver() { + ethtool -i "$1" | sed -n -E "s/driver: (.*)/\1/p" +} + # Prefix kernel assigned names with "kdump-". EX: eth0 -> kdump-eth0 # Because kernel assigned names are not persistent between 1st and 2nd # kernel. We could probably end up with eth0 being eth1, eth0 being @@ -314,7 +318,7 @@ kdump_setup_ifname() { # fadump to kdump. Skip prefixing 'kdump-' in this case as adding # another prefix may truncate the ifname. Since an ifname with # 'kdump-' is already persistent, this should be fine. - if [[ $1 =~ eth* ]] && [[ ! $1 =~ ^kdump-* ]]; then + if [[ $1 =~ eth* ]] && [[ ! $1 =~ ^kdump-* ]] && [[ $(_get_nic_driver "$1") != hv_netvsc ]]; then _ifname="kdump-$1" else _ifname="$1"