in src/ade.rs [153:179]
fn mount_bek_volume() -> Result<()> {
create_rescue_bek_dir()?;
let bek_volume = match helper::run_fun("blkid -t LABEL='BEK VOLUME' -o device") {
Ok(device) => {
debug!("BEK volume details: {device}");
device
}
Err(e) => {
error!("blkid raised an error : {e}");
error!("Please set the password manually and run ALAR with the option : --ade-password <password>");
process::exit(1);
}
};
if bek_volume.is_empty() {
error!("There is no BEK VOLUME attached to the VM");
error!("Please get the password manually and run ALAR with the option : --ade-password <password>");
process::exit(1);
};
mount::mount(bek_volume.trim(), constants::RESCUE_BEK, "", false)?;
if !Path::new(constants::RESCUE_BEK_LINUX_PASS_PHRASE_FILE_NAME).exists() {
error!("The pass phrase file doesn't exist. Please restart the VM to get the file LinuxPassPhraseFileName automatically created.");
mount::umount(constants::RESCUE_BEK, false)?;
process::exit(1);
}
Ok(())
}