Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install: Improve early output #393

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,10 @@ pub(crate) fn setup_tmp_mounts() -> Result<()> {
} else {
// Note we explicitly also don't want a "nosuid" tmp, because that
// suppresses our install_t transition
Task::new_and_run(
"Mounting tmpfs /tmp",
"mount",
["tmpfs", "-t", "tmpfs", "/tmp"],
)?;
Task::new("Mounting tmpfs /tmp", "mount")
.args(["tmpfs", "-t", "tmpfs", "/tmp"])
.quiet()
.run()?;
}

// Point our /var/tmp at the host, via the /proc/1/root magic link
Expand Down Expand Up @@ -918,11 +917,10 @@ pub(crate) fn setup_sys_mount(fstype: &str, fspath: &str) -> Result<()> {
}

// This means the host has this mounted, so we should mount it too
Task::new_and_run(
format!("Mounting {fstype} {fspath}"),
"mount",
["-t", fstype, fstype, fspath],
)
Task::new(format!("Mounting {fstype} {fspath}"), "mount")
.args(["-t", fstype, fstype, fspath])
.quiet()
.run()
}

/// Verify that we can load the manifest of the target image
Expand Down Expand Up @@ -1026,6 +1024,8 @@ async fn prepare_install(
let (override_disable_selinux, setenforce_guard) =
reexecute_self_for_selinux_if_needed(&source, config_opts.disable_selinux)?;

println!("Installing: {:#}", &target_imgref);

let install_config = config::load_config()?;
tracing::debug!("Loaded install configuration");

Expand Down
9 changes: 4 additions & 5 deletions lib/src/install/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,10 @@ pub(crate) fn install_create_rootfs(
}
let devdir = mntdir.join("dev");
std::fs::create_dir_all(&devdir)?;
Task::new_and_run(
"Mounting devtmpfs",
"mount",
["devtmpfs", "-t", "devtmpfs", devdir.as_str()],
)?;
Task::new("Mounting devtmpfs", "mount")
.args(["devtmpfs", "-t", "devtmpfs", devdir.as_str()])
.quiet()
.run()?;

// Now at this point, our /dev is a stale snapshot because we don't have udev running.
// So from hereon after, we prefix devices with our temporary devtmpfs mount.
Expand Down
Loading