(
opts: &RollbackOpts,
storage: &Storage,
booted_ostree: &BootedOstree<'_>,
)
| 1523 | /// Implementation of the `bootc rollback` CLI command for ostree backend. |
| 1524 | #[context("Rollback (ostree)")] |
| 1525 | async fn rollback_ostree( |
| 1526 | opts: &RollbackOpts, |
| 1527 | storage: &Storage, |
| 1528 | booted_ostree: &BootedOstree<'_>, |
| 1529 | ) -> Result<()> { |
| 1530 | crate::deploy::rollback(storage).await?; |
| 1531 | |
| 1532 | if opts.soft_reboot.is_some() { |
| 1533 | // Get status of rollback deployment to check soft-reboot capability |
| 1534 | let host = crate::status::get_status(booted_ostree)?.1; |
| 1535 | |
| 1536 | handle_soft_reboot( |
| 1537 | opts.soft_reboot, |
| 1538 | host.status.rollback.as_ref(), |
| 1539 | "rollback", |
| 1540 | || soft_reboot_rollback(booted_ostree), |
| 1541 | )?; |
| 1542 | } |
| 1543 | |
| 1544 | Ok(()) |
| 1545 | } |
| 1546 | |
| 1547 | /// Implementation of the `bootc rollback` CLI command. |
| 1548 | #[context("Rollback")] |
no test coverage detected