Skip to content

Commit

Permalink
install: Track is_alongside
Browse files Browse the repository at this point in the history
We're going to need to dispatch other behavior on this around
the bootloader, so make it a generic thing.

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Oct 23, 2023
1 parent b9b311f commit b3e35c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,8 @@ pub(crate) struct RootSetup {
rootfs: Utf8PathBuf,
rootfs_fd: Dir,
rootfs_uuid: Option<String>,
/// If true, do not try to remount the root read-only and flush the journal, etc.
skip_finalize: bool,
/// True if this is an "alongside" install where we didn't create the filesystem
is_alongside: bool,
boot: Option<MountSpec>,
kargs: Vec<String>,
}
Expand Down Expand Up @@ -882,7 +882,7 @@ async fn install_to_filesystem_impl(state: &State, rootfs: &mut RootSetup) -> Re
.run()?;

// Finalize mounted filesystems
if !rootfs.skip_finalize {
if !rootfs.is_alongside {
let bootfs = rootfs.rootfs.join("boot");
for fs in [bootfs.as_path(), rootfs.rootfs.as_path()] {
finalize_filesystem(fs)?;
Expand Down Expand Up @@ -1112,7 +1112,7 @@ pub(crate) async fn install_to_filesystem(opts: InstallToFilesystemOpts) -> Resu
rootfs_uuid: inspect.uuid.clone(),
boot,
kargs,
skip_finalize: matches!(fsopts.replace, Some(ReplaceMode::Alongside)),
is_alongside: matches!(fsopts.replace, Some(ReplaceMode::Alongside)),
};

install_to_filesystem_impl(&state, &mut rootfs).await?;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/install/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,6 @@ pub(crate) fn install_create_rootfs(
rootfs_uuid: Some(root_uuid.to_string()),
boot: Some(boot),
kargs,
skip_finalize: false,
is_alongside: false,
})
}

0 comments on commit b3e35c4

Please sign in to comment.