Skip to content

Commit dec2d7c

Browse files
Johan-Liebert1cgwalters
authored andcommitted
install: Add bootloader option
For composefs backend we'd sometimes want to override the bootloader. Currently we have logic that check if an image has bootupd or not, and if it does we use grub as the bootloader, even if systemd-boot is actually installed We use this option to override the bootloader Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
1 parent ac5d74a commit dec2d7c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

crates/kit/src/install_options.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ pub struct InstallOptions {
4040
/// Default to composefs-native storage
4141
#[clap(long)]
4242
pub composefs_backend: bool,
43+
44+
/// Which bootloader to use for composefs-native backend
45+
#[clap(long, requires = "composefs_backend")]
46+
pub bootloader: Option<String>,
4347
}
4448

4549
impl InstallOptions {
@@ -70,6 +74,11 @@ impl InstallOptions {
7074
args.push("--composefs-backend".to_owned());
7175
}
7276

77+
if let Some(b) = &self.bootloader {
78+
args.push("--bootloader".into());
79+
args.push(b.clone());
80+
}
81+
7382
args
7483
}
7584
}

0 commit comments

Comments
 (0)