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@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Dave Young 2012-06-12 09:42:29 +08:00
parent e720fcdadf
commit d5bc608abd
1 changed files with 3 additions and 8 deletions

View File

@ -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"