[kexec-tools] remove multi dump [v2]

Dave Young yangrr at fedoraproject.org
Wed May 2 02:14:39 UTC 2012


commit b71fc17869b8e22c063b828c0cdfface5f7b48b6
Author: Dave Young <dyoung at redhat.com>
Date:   Sat Apr 28 15:17:13 2012 +0800

    remove multi dump [v2]
    
    remove multi dump
    
    Resolves: bz816859
    
    multi dump was not written as a failsafe dump. Also it was not really tested.
    It introduced more complexity in the early phase of porting plenty of rhel6
    functions, so we'd remove it and concentrate on the base functionalities.
    
    [v1->v2]: vivek: better error message
    
    Signed-off-by: Dave Young <dyoung at redhat.com>
    Acked-by: Vivek Goyal <vgoyal at redhat.com>

 kdump_dracut_modules/99kdumpbase/kdump.sh |    7 +------
 kdumpctl                                  |    7 +++++++
 2 files changed, 8 insertions(+), 6 deletions(-)
---
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=$?


More information about the scm-commits mailing list