MCPcopy Create free account
hub / github.com/bootc-dev/bootc / write_reboot_required

Function write_reboot_required

crates/lib/src/deploy.rs:1153–1161  ·  view source on GitHub ↗

Update the /run/reboot-required file with the image that will be active after a reboot.

(image: &str)

Source from the content-addressed store, hash-verified

1151
1152/// Update the /run/reboot-required file with the image that will be active after a reboot.
1153fn write_reboot_required(image: &str) -> Result<()> {
1154 let reboot_message = format!("bootc: Reboot required for image: {}", image);
1155 let run_dir = Dir::open_ambient_dir("/run", cap_std::ambient_authority())?;
1156 run_dir
1157 .atomic_write("reboot-required", reboot_message.as_bytes())
1158 .context("Creating /run/reboot-required")?;
1159
1160 Ok(())
1161}
1162
1163pub(crate) const ROLLBACK_JOURNAL_ID: &str = "26f3b1eb24464d12aa5e7b544a6b5468";
1164

Callers 2

stageFunction · 0.85
rollbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected