Skip to content

Commit e7d15d4

Browse files
authored
Merge pull request #1398 from jmarrero/reboot
lib/src/reboot: use systemd-run to execute the reboot
2 parents bb5171b + 9f566a2 commit e7d15d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/reboot.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ pub(crate) fn reboot() -> anyhow::Result<()> {
1313
// Flush output streams
1414
let _ = std::io::stdout().flush();
1515
let _ = std::io::stderr().flush();
16-
Task::new("Rebooting system", "reboot").run()?;
16+
Task::new("Rebooting system", "systemd-run")
17+
.args(["--message=Initiated by bootc", "reboot"])
18+
.run()?;
1719
tracing::debug!("Initiated reboot, sleeping forever...");
1820
loop {
1921
std::thread::park();

0 commit comments

Comments
 (0)