Skip to content

Commit

Permalink
bootloader: Add BOOTC_BOOTLOADER_DEBUG env var
Browse files Browse the repository at this point in the history
To force on verbose tracing for bootupd to debug things.
  • Loading branch information
cgwalters committed Oct 13, 2023
1 parent ea68e1b commit d77d43f
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions lib/src/bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,15 @@ pub(crate) fn install_via_bootupd(
rootfs: &Utf8Path,
boot_uuid: &str,
) -> Result<()> {
Task::new_and_run(
"Running bootupctl to install bootloader",
"bootupctl",
[
"backend",
"install",
"--src-root",
"/",
"--device",
device.as_str(),
rootfs.as_str(),
],
)?;
let verbose = std::env::var_os("BOOTC_BOOTLOADER_DEBUG").map(|_| "-vvvv");
let args = ["backend", "install"].into_iter().chain(verbose).chain([
"--src-root",
"/",
"--device",
device.as_str(),
rootfs.as_str(),
]);
Task::new_and_run("Running bootupctl to install bootloader", "bootupctl", args)?;

let grub2_uuid_contents = format!("set BOOT_UUID=\"{boot_uuid}\"\n");

Expand Down

0 comments on commit d77d43f

Please sign in to comment.