Skip to content

Commit 3a1f2d9

Browse files
committed
insert a reasonnable default PATH into the chroot
Signed-off-by: jbtrystram <jbtrystram@redhat.com>
1 parent 09299f8 commit 3a1f2d9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

crates/lib/src/bootloader.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ pub(crate) fn install_via_bootupd(
148148
};
149149
let install_result = bootupctl
150150
.args(chroot_args)
151+
// Inject a reasonnable PATH here so we find the required tools
152+
// when running chrooted in the deployment. Testing show that
153+
// the default $PATH value in the chroot is insufficient.
154+
.env(
155+
"PATH",
156+
"/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
157+
)
151158
.args(["backend", "install", "--write-uuid"])
152159
.args(verbose)
153160
.args(bootupd_opts.iter().copied().flatten())

0 commit comments

Comments
 (0)