diff --git a/kdump_dracut_modules/99kdumpbase/kdump.sh b/kdump_dracut_modules/99kdumpbase/kdump.sh index b2087dc..d417b3c 100755 --- a/kdump_dracut_modules/99kdumpbase/kdump.sh +++ b/kdump_dracut_modules/99kdumpbase/kdump.sh @@ -26,12 +26,7 @@ do_default_action() add_dump_code() { - if [ -z "$DUMP_INSTRUCTION" ] - then - DUMP_INSTRUCTION="$1" - else - DUMP_INSTRUCTION="$DUMP_INSTRUCTION && $1" - fi + DUMP_INSTRUCTION="$1" } get_mp() diff --git a/kdumpctl b/kdumpctl index 842afa3..420265f 100755 --- a/kdumpctl +++ b/kdumpctl @@ -283,6 +283,13 @@ function status() function start() { + local nr + nr=$(awk 'BEGIN{cnt=0} /^raw|^net|^ext[234]|^xfs|^btrfs|^minix/{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) + [ $nr -gt 1 ] && { + echo -n "Error: More than one dump targets specified"; echo + return 1 + } + #TODO check raw partition for core dump image status rc=$?