Two minor issues see incline comment, otherwise it looks good to me.
On 12/01/14 at 03:52pm, WANG Chao wrote:
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(a)redhat.com>
---
dracut-kdump.sh | 7 -------
kdump-lib-initramfs.sh | 7 +++----
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index 4fef0c5..dc948d1 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -169,13 +169,6 @@ fence_kdump_notify()
read_kdump_conf
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
if [ $? -ne 0 ]; then
echo "kdump: get_host_ip exited with non-zero status!"
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index f882b09..a3fcba9 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -34,7 +34,6 @@ get_kdump_confs()
;;
core_collector)
[ -n "$config_val" ] &&
CORE_COLLECTOR="$config_val"
- user_specified_cc=yes
the local variable defination should be removed as well.
;;
sshkey)
if [ -f "$config_val" ]; then
@@ -75,12 +74,12 @@ get_kdump_confs()
esac
done < $KDUMP_CONF
- if is_ssh_dump_target || is_raw_dump_target; then
- if [ -z "$user_specified_cc" ]; then
+ if [ -z "$CORE_COLLECTOR" ]; then
indent issue?
+ CORE_COLLECTOR="$DEFAULT_CORE_COLLECTOR"
+ if is_ssh_dump_target || is_raw_dump_target; then
CORE_COLLECTOR="$CORE_COLLECTOR -F"
fi
fi
-
}
# dump_fs <mount point| device>
--
1.9.3