This commit makes dump_ssh to add 'kdump-' prefix to ipv6
hosts with 'eth*' like interfaces before dumping to the host.
Signed-off-by: Ziyue Yang <ziyang(a)redhat.com>
---
dracut-kdump.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index b75c2a5..a50eb60 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -75,6 +75,16 @@ dump_ssh()
local _dir="$KDUMP_PATH/$HOST_IP-$DATEDIR"
local _host=$2
+ # figure out "kdump- prefixed network interface name for
+ # link-local ipv6 address
+ if [[ $_host == *":"* ]]; then
+ local _host_prefix=${_host%\%*}
+ local _ifname=${_host##*\%}
+ if [[ $_ifname == "eth"* ]]; then
+ _host="$_host_prefix%kdump-$_ifname"
+ fi
+ fi
+
echo "kdump: saving to $_host:$_dir"
cat /var/lib/random-seed > /dev/urandom
--
2.9.3