Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dracut] avoid 100s delay with rpm-ostree cliwrap
When calling dracut on an rpm-ostree based system with cliwrap enabled you get the following message: ``` This system is rpm-ostree based; initramfs handling is integrated with the underlying ostree transaction mechanism. Use `rpm-ostree initramfs` to control client-side initramfs generation. rpm-ostree: Note: This system is image (rpm-ostree) based. rpm-ostree: Dropping privileges as `dracut` was executed with not "known safe" arguments. rpm-ostree: You may invoke the real `dracut` binary in `/usr/libexec/rpm-ostree/wrapped/dracut`. rpm-ostree: Continuing execution in 5 seconds. ``` Calling `/usr/libexec/rpm-ostree/wrapped/dracut --print-cmdline` is still slow because it calls rpm multiple times which is also a wrapped cli. Call dracut with the env variable RPMOSTREE_CLIWRAP_SKIP to avoid the 5s waits. This is safe because we only use read only commands. With rpm-ostree v2024.4 `rpm --eval` is marked as safe, so we don't have the 5s wait anymore for rpm calls (coreos/rpm-ostree#4835) Resolves: RHEL-33703 Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
- Loading branch information