[PATCH] Check "default" option config in kdump.conf
by WANG Chao
"default" option only takes reboot/halt/poweroff/shell/dump_to_rootfs as
its config value. Otherwise kdump service fails early.
Signed-off-by: WANG Chao <chaowang(a)redhat.com>
---
kdumpctl | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index ee3214a..8d27086 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -242,7 +242,7 @@ check_config()
case "$config_opt" in
\#* | "")
;;
- raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes)
+ raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes)
[ -z "$config_val" ] && {
echo "Invalid kdump config value for option $config_opt."
return 1;
@@ -252,6 +252,16 @@ check_config()
echo "Deprecated kdump config option: $config_opt. Refer to kdump.conf manpage for alternatives."
return 1
;;
+ default)
+ case "$config_val" in
+ reboot|halt|poweroff|shell|dump_to_rootfs)
+ ;;
+ *)
+ echo "Invalid kdump config value for option $config_opt."
+ return 1
+ ;;
+ esac
+ ;;
*)
echo "Invalid kdump config option $config_opt"
return 1;
--
1.9.3
9 years, 4 months
[PATCH v3] kdump-initramfs-lib: Fix core_collector issue
by WANG Chao
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 | 8 +++-----
2 files changed, 3 insertions(+), 12 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..57b8304 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -22,7 +22,6 @@ NEWROOT="/sysroot"
get_kdump_confs()
{
local config_opt config_val
- local user_specified_cc
while read config_opt config_val;
do
@@ -34,7 +33,6 @@ get_kdump_confs()
;;
core_collector)
[ -n "$config_val" ] && CORE_COLLECTOR="$config_val"
- user_specified_cc=yes
;;
sshkey)
if [ -f "$config_val" ]; then
@@ -75,12 +73,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
+ 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
9 years, 4 months
[PATCH v2] kdump-initramfs-lib: Fix core_collector issue
by WANG Chao
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
;;
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
+ 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
9 years, 4 months
[PATCH 0/2 v4] Enhance kdump to support ipv6
by Minfei Huang
v4:
- For ethX, rename the network device name when use the type of link
scope, like ip address format: fe80::5054:ff:fe48:ca80%eth0
v3:
- Support the static route
v2:
- Fix some bugs
Minfei Huang (2):
dracut-kdump: Correct the known hosts in the file known_hosts via ipv6
ipv6: Enhance kdump to support ipv6
dracut-kdump.sh | 31 +++++++++-
dracut-module-setup.sh | 158 +++++++++++++++++++++++++++++++++----------------
kdump-lib.sh | 50 ++++++++++++++++
mkdumprd | 14 ++++-
4 files changed, 199 insertions(+), 54 deletions(-)
--
1.8.3.1
9 years, 4 months
[PATCH 0/2] module-setup: Fix some bugs about static route
by Minfei Huang
Fix some bugs to make the static route work in the 2nd kernel.
Minfei Huang (2):
module-setup: Do not show the noisy in the terminal
module-setup: Correct the ethernet device name to make it work in 2nd
kernel
dracut-module-setup.sh | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--
1.8.3.1
9 years, 4 months
[PATCH 0/2 v2] module-setup: Fix some bugs about static route
by Minfei Huang
Fix some bugs to make the static route work in the 2nd kernel.
Minfei Huang (2):
module-setup: Do not show the noisy in the terminal
module-setup: Correct the ethernet device name to make it work in 2nd
kernel
dracut-module-setup.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
1.8.3.1
9 years, 4 months