On 06/23/15 at 03:48pm, Dave Young wrote:
On 06/13/15 at 02:51pm, Minfei Huang wrote:
> The ipv6 link scope (like: fe80::fab1:56ff:feb6:56d5%eth1) needs to
> append the netdevice to identify the ipv6 address.
>
> Due to add prefix "kdump-" before ethX(commit: ba7660f) in the 2nd
> kernel, we should correct the mount parameter and /etc/kdump.conf to
> add the prefix "kdump-" before ethX, if use the ipv6 link scope.
>
> Signed-off-by: Minfei Huang <mhuang(a)redhat.com>
> Acked-by: Dave Young <dyoung(a)redhat.com>
> ---
> dracut-module-setup.sh | 23 +++++++++++++++++++++++
> mkdumprd | 16 +++++++++++++++-
> 2 files changed, 38 insertions(+), 1 deletion(-)
>
> diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
> index 73ab938..fd60b24 100755
> --- a/dracut-module-setup.sh
> +++ b/dracut-module-setup.sh
> @@ -380,6 +380,28 @@ adjust_bind_mount_path()
> fi
> }
>
> +# The ipv6 link scope (like: fe80::fab1:56ff:feb6:56d5%eth1) needs to
> +# append the netdevice to identify the ipv6 address. Kdump will add the
> +# prefix "kdump-" before ethX in the 2nd kernel.
> +kdump_ipv6_netdev_fixup()
> +{
> + local _srcaddr _tmp_conf=$1
> + if is_ssh_dump_target; then
> + _srcaddr=$(get_option_value ssh)
> + elif is_nfs_dump_target; then
> + _srcaddr=$(get_option_value nfs)
> + fi
> +
> + if [ "x" != "x"$_srcaddr ] && `echo $_srcaddr |
grep -q "%"`; then
> + local _orig_netdev=${_srcaddr#*\%}
> + _orig_netdev=${_orig_netdev%]*}
> + local _pre_netdev=$(kdump_setup_ifname $_orig_netdev)
> + if [ "x"$_orig_netdev != "x"$_pre_netdev ]; then
> + sed -i "s#$_orig_netdev#$_pre_netdev#" $_tmp_conf
> + fi
> + fi
> +}
Rethink about this, it should be fixed in function kdump_setup_ifname()
instead of fix it outside..
We call the function kdump_setup_ifname to add the prefix "kdump-", if
it is necessary. Maybe we can change the caller kdump_ipv6_netdev_fixup
to kdump_fixup_netdev_conf.
Thanks
Minfei