On 01/22/15 at 03:44pm, Minfei Huang wrote:
On 01/22/15 at 03:30pm, Dave Young wrote:
On 01/15/15 at 07:27pm, Minfei Huang wrote:
The ipv6 link scope 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@redhat.com
dracut-module-setup.sh | 20 ++++++++++++++++++++ kdump-lib.sh | 2 +- mkdumprd | 16 +++++++++++++++- 3 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index ff7a088..1e81b42 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -339,6 +339,25 @@ default_dump_target_install_conf()
}
+kdump_ipv6_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 _netdev=${_srcaddr#*\%}
_netdev=${_netdev%]*}
local _pre_netdev=$(kdump_setup_ifname $_netdev)
if [ "x"$_netdev != "x"$_pre_netdev ]; then
sed -i "s#$_netdev#$_pre_netdev#" $_tmp_conf
fi
- fi
+}
#install kdump.conf and what user specifies in kdump.conf kdump_install_conf() { sed -ne '/^#/!p' /etc/kdump.conf > /tmp/$$-kdump.conf @@ -353,6 +372,7 @@ kdump_install_conf() { ;; ssh|nfs) kdump_install_net "$config_val"
kdump_ipv6_fixup "/tmp/$$-kdump.conf" ;; kdump_pre|kdump_post|extra_bins) dracut_install $config_val
diff --git a/kdump-lib.sh b/kdump-lib.sh index f24f08d..b886c5d 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -146,7 +146,7 @@ check_save_path_fs() kdump_setup_ifname() { local _ifname
- if [[ $1 =~ eth* ]]; then
- if [[ "$1" =~ eth* ]]; then
The above bug fix should be in a seperate patch..
Hi, Dave!
If I just post the patch modified above code, it may be confuse by some guys why we just add the quote around the $1. Maybe we can block it to wait for other reviewer's comment.
It is an obvious fix for another patch. But I'm ok with it in this series.
Thanks Dave