move conf_file as a global variable to the top.
vivek: return earlier if kdump.conf is not found in read_kdump_conf to
avoid the deep indent.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
let add_dump_code only deal with real dump instruction,
move other logic out of that function, so it's easier for future features
like kdump_pre and kdump_post.
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
default action is handled in DUMP_INSTRUCTIONI. If default_action failed
current logic will cause mount_root_run_init, It does not make much sense.
changes to: let reboot -f does not depend on return status of DUMP_INSTRUCTION
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
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>
Resolves: bz805773
simplify logic and remove redundant code:
put do_default_action to add_dump_code
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Resolves: bz816864
currently kexec-tools maintains kdump dracut modules as below dir hierarchy:
[dave@localhost fedpkg]$ tree kexec-tools/kdump_dracut_modules
kexec-tools/kdump_dracut_modules
`-- 99kdumpbase
|-- kdump.sh
`-- module-setup.sh
But in kexec-tools.spec, sources line is below:
Source100: dracut-files.tbz2
So we need to manually generate the dracut-files.tbz2, upload it, modify
the sources file which contains the md5sum of these binaies, and then do
the building. The more headache problem is this make local tests of
changes to kdump module hard.
To ease future work, move the files to TOPDIR, cp the sources instead.
Thanks for help from dzickus
[v1->v2]: Also remove dracut-files.tbz2 from sources file
ChaoWang: add prefix to dracut files