Trying to figure out blkid thing. Add --probe flag.

This commit is contained in:
kira committed 2026-07-29 23:16:32 +02:00
1 parent c132ca3ffa
commit 316ffce414
4 files changed
+23 -4

No files matched your search

+7 -2
View File
@@ -41,7 +41,7 @@ const BEE_CAT: &str = include_str!("bee_cat.txt");
//const ROOT_PARTLABEL: &str = "bee-root";
const ROOT_PARTLABEL: &str = "bee-root";
const TMP_ROOT: &str = "/mnt/bee_root";
const TMP_ROOT_SNAPS: &str = "/mnt/bee-root/bzz_snaps";
const TMP_ROOT_SNAPS: &str = "/mnt/bee_root/bzz_snaps";
const SYS_INIT: &str = "/sbin/init";
// fn bee_root_is_present() -> bool {
@@ -95,7 +95,12 @@ fn init_stage() -> Result<(String, NyanitState), ExecCommandError> {
nyan_system::prepare_env().map_err(|ex| format!("prepare_env error: {}", ex))?;
// get bee-root device name aka /dev/sda1
let bee_root_dev = nyan_system::find_partlabel(ROOT_PARTLABEL)?;
let bee_root_dev = match nyan_system::find_partlabel(ROOT_PARTLABEL) {
Err(_ex) => {
return Err(ExecCommandError::Other(nyan_system::list_partlabel().unwrap()))
},
Ok(v)=>v
};
// check if device is encrypted
if nyan_system::bzzpss_dev_encrypted(&bee_root_dev).map_err(|ex| format!("Error checking if device is encrypted: {}", ex))? {
// if encrypted return EnterPassword so used get promted for pass