mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-07-26 06:59:28 +02:00
Optionally run a command for chroot
This commit is contained in:
parent
420756df61
commit
7b235aa9bc
@ -83,6 +83,10 @@ struct ChrootCommand {
|
||||
/// Open an encrypted root partition
|
||||
#[structopt(short = "e", long = "encrypted-root")]
|
||||
encrypted_root: bool,
|
||||
|
||||
/// Optional command to run
|
||||
#[structopt()]
|
||||
command: Vec<String>,
|
||||
}
|
||||
|
||||
fn fix_fstab(fstab: &str) -> String {
|
||||
@ -293,6 +297,7 @@ fn chroot(command: ChrootCommand) -> Result<(), Error> {
|
||||
arch_chroot
|
||||
.execute()
|
||||
.arg(mount_point.path())
|
||||
.args(&command.command)
|
||||
.run(ErrorKind::Interactive)?;
|
||||
|
||||
info!("Unmounting filesystems");
|
||||
|
Loading…
x
Reference in New Issue
Block a user