kdump-initramfs-lib: Fix core_collector issue
In ssh or raw dump case, if user do not specify "core_collector" in kdump.conf, kdump will fail. Because global DEFAULT_CORE_COLLECTOR variable isn't applied to CORE_COLLECTOR. Now fix it and clean up the duplicate code in kdump.sh. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Dave Young <dyoung@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
eedfc174a6
commit
1742affe2c
|
@ -169,13 +169,6 @@ fence_kdump_notify()
|
||||||
read_kdump_conf
|
read_kdump_conf
|
||||||
fence_kdump_notify
|
fence_kdump_notify
|
||||||
|
|
||||||
if [ -z "$CORE_COLLECTOR" ];then
|
|
||||||
CORE_COLLECTOR=$DEFAULT_CORE_COLLECTOR
|
|
||||||
if is_ssh_dump_target || is_raw_dump_target; then
|
|
||||||
CORE_COLLECTOR="$CORE_COLLECTOR -F"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
get_host_ip
|
get_host_ip
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "kdump: get_host_ip exited with non-zero status!"
|
echo "kdump: get_host_ip exited with non-zero status!"
|
||||||
|
|
|
@ -22,7 +22,6 @@ NEWROOT="/sysroot"
|
||||||
get_kdump_confs()
|
get_kdump_confs()
|
||||||
{
|
{
|
||||||
local config_opt config_val
|
local config_opt config_val
|
||||||
local user_specified_cc
|
|
||||||
|
|
||||||
while read config_opt config_val;
|
while read config_opt config_val;
|
||||||
do
|
do
|
||||||
|
@ -34,7 +33,6 @@ get_kdump_confs()
|
||||||
;;
|
;;
|
||||||
core_collector)
|
core_collector)
|
||||||
[ -n "$config_val" ] && CORE_COLLECTOR="$config_val"
|
[ -n "$config_val" ] && CORE_COLLECTOR="$config_val"
|
||||||
user_specified_cc=yes
|
|
||||||
;;
|
;;
|
||||||
sshkey)
|
sshkey)
|
||||||
if [ -f "$config_val" ]; then
|
if [ -f "$config_val" ]; then
|
||||||
|
@ -75,12 +73,12 @@ get_kdump_confs()
|
||||||
esac
|
esac
|
||||||
done < $KDUMP_CONF
|
done < $KDUMP_CONF
|
||||||
|
|
||||||
|
if [ -z "$CORE_COLLECTOR" ]; then
|
||||||
|
CORE_COLLECTOR="$DEFAULT_CORE_COLLECTOR"
|
||||||
if is_ssh_dump_target || is_raw_dump_target; then
|
if is_ssh_dump_target || is_raw_dump_target; then
|
||||||
if [ -z "$user_specified_cc" ]; then
|
|
||||||
CORE_COLLECTOR="$CORE_COLLECTOR -F"
|
CORE_COLLECTOR="$CORE_COLLECTOR -F"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# dump_fs <mount point| device>
|
# dump_fs <mount point| device>
|
||||||
|
|
Loading…
Reference in New Issue