Currently, 'kdump-' is prefixed to the name of the network interface
for interface names such as net0, randomnet, persistentnet, etc., even
though they are persistent in nature. Ensure the interface name is
renamed only when it is a kernel assigned name (eth#).
Signed-off-by: Hari Bathini <hbathini(a)linux.ibm.com>
---
dracut-module-setup.sh | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 9d0b956..a8a22bd 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -161,11 +161,7 @@ kdump_get_perm_addr() {
kdump_setup_ifname() {
local _ifname
- # If ifname already has 'kdump-' prefix, we must be switching from
- # 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[0-9] ]]; then
_ifname="kdump-$1"
else
_ifname="$1"