kdumpctl: update check_dump_fs_modified() to use "lsinitrd -f"
We use faster "lsinitrd XXX -f usr/lib/dracut/build-parameter.txt" instead of "lsinitrd XXX | grep "^Arguments:" | head -1", this can save us around one second. Signed-off-by: Xunlei Pang <xlpang@redhat.com> Acked-by: Pratyush Anand <panand@redhat.com> Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
2a5f362521
commit
88a3385e96
2
kdumpctl
2
kdumpctl
@ -539,7 +539,7 @@ check_dump_fs_modified()
|
||||
_new_mntpoint="/kdumproot/$(get_mntpoint_from_target $_target)"
|
||||
fi
|
||||
|
||||
_dracut_args=$(lsinitrd $TARGET_INITRD | grep "^Arguments:" | head -1)
|
||||
_dracut_args=$(lsinitrd $TARGET_INITRD -f usr/lib/dracut/build-parameter.txt)
|
||||
if [[ -z "$_dracut_args" ]];then
|
||||
echo "Warning: No dracut arguments found in initrd"
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user