"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
Show replies by date