Update the /run/reboot-required file with the image that will be active after a reboot.
(image: &str)
| 1151 | |
| 1152 | /// Update the /run/reboot-required file with the image that will be active after a reboot. |
| 1153 | fn 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 | |
| 1163 | pub(crate) const ROLLBACK_JOURNAL_ID: &str = "26f3b1eb24464d12aa5e7b544a6b5468"; |
| 1164 |