Skip to content

Commit c80632a

Browse files
say-paulPackit Build
authored andcommitted
add log info for boot state and remount actions
greenboot log will have the initial boot state,remounting actions
1 parent da24f01 commit c80632a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/main.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,22 @@ where
111111
let was_rw =
112112
is_boot_rw().map_err(|e| anyhow::anyhow!("Failed to check boot mount state: {}", e))?;
113113

114+
log::info!(
115+
"Initial /boot mount state: {}",
116+
if was_rw { "rw" } else { "ro" }
117+
);
118+
114119
if !was_rw {
120+
log::info!("Remounting /boot as rw for operation");
115121
remount_boot_rw().context("Failed to remount /boot as rw")?;
122+
} else {
123+
log::info!("/boot is already rw; no remount needed");
116124
}
117125

118126
let op_result = f();
119127

120128
if !was_rw {
129+
log::info!("Restoring /boot mount to ro");
121130
remount_boot_ro().context("Failed to remount /boot as ro")?;
122131
}
123132

0 commit comments

Comments
 (0)