[kexec-tools] dump_rootfs for default target fix
Dave Young
yangrr at fedoraproject.org
Tue Jun 12 01:46:14 UTC 2012
commit d5bc608abd93f2bf584ead30d0fc8bba20a639b3
Author: Dave Young <dyoung at redhat.com>
Date: Tue Jun 12 09:42:29 2012 +0800
dump_rootfs for default target fix
Do not reboot in dump_rootfs function, also do not directly call dump_rootfs
for default dump. Instead just adding it to DUMP_INSTRUCTION as other
user specified dump target.
Signed-off-by: Dave Young <dyoung at redhat.com>
Acked-by: Vivek Goyal <vgoyal at redhat.com>
dracut-kdump.sh | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index c66ce0d..03a3c48 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -100,8 +100,6 @@ dump_rootfs()
mkdir -p $NEWROOT/$KDUMP_PATH/$DATEDIR
$CORE_COLLECTOR /proc/vmcore $NEWROOT/$KDUMP_PATH/$DATEDIR/vmcore || return 1
sync
- reboot -f
- return 0
}
dump_nfs()
@@ -185,11 +183,8 @@ read_kdump_conf()
read_kdump_conf
-if [ -n "$DUMP_INSTRUCTION" ]
-then
- eval "$DUMP_INSTRUCTION && reboot -f"
-else
- dump_rootfs
+if [ -z "$DUMP_INSTRUCTION" ]; then
+ add_dump_code "dump_rootfs"
fi
-
+eval "$DUMP_INSTRUCTION && reboot -f"
More information about the scm-commits
mailing list