There is a system-wide sync call at the end of mkdumprd, move it to
kdumpctl after rebuild initrd and add another one for mkfadumprd.
Sync only the $TARGET_INITRD to avoid a system-wide sync taking too
long on a system with high disk activity.
Signed-off-by: Lichen Liu <lichliu(a)redhat.com>
---
kdumpctl | 2 ++
mkdumprd | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 9fd76ac..fa83c05 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -79,6 +79,7 @@ rebuild_fadump_initrd()
return 1
fi
+ sync -f "$TARGET_INITRD"
return 0
}
@@ -100,6 +101,7 @@ rebuild_kdump_initrd()
dwarn "Tips: If early kdump is enabled, also require rebuilding the system
initramfs to make the changes take effect for early kdump."
fi
+ sync -f "$TARGET_INITRD"
return 0
}
diff --git a/mkdumprd b/mkdumprd
index 593ec77..d5f8945 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -460,5 +460,4 @@ fi
dracut "${dracut_args[@]}" "$@"
_rc=$?
-sync
exit $_rc
--
2.27.0