Skip to content

Commit ac17000

Browse files
authored
Merge pull request #393 from cgwalters/install-log-container
install: Improve early output
2 parents b809bcf + 3ee4e0e commit ac17000

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

lib/src/install.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -849,11 +849,10 @@ pub(crate) fn setup_tmp_mounts() -> Result<()> {
849849
} else {
850850
// Note we explicitly also don't want a "nosuid" tmp, because that
851851
// suppresses our install_t transition
852-
Task::new_and_run(
853-
"Mounting tmpfs /tmp",
854-
"mount",
855-
["tmpfs", "-t", "tmpfs", "/tmp"],
856-
)?;
852+
Task::new("Mounting tmpfs /tmp", "mount")
853+
.args(["tmpfs", "-t", "tmpfs", "/tmp"])
854+
.quiet()
855+
.run()?;
857856
}
858857

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

920919
// This means the host has this mounted, so we should mount it too
921-
Task::new_and_run(
922-
format!("Mounting {fstype} {fspath}"),
923-
"mount",
924-
["-t", fstype, fstype, fspath],
925-
)
920+
Task::new(format!("Mounting {fstype} {fspath}"), "mount")
921+
.args(["-t", fstype, fstype, fspath])
922+
.quiet()
923+
.run()
926924
}
927925

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

1027+
println!("Installing: {:#}", &target_imgref);
1028+
10291029
let install_config = config::load_config()?;
10301030
tracing::debug!("Loaded install configuration");
10311031

lib/src/install/baseline.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,10 @@ pub(crate) fn install_create_rootfs(
175175
}
176176
let devdir = mntdir.join("dev");
177177
std::fs::create_dir_all(&devdir)?;
178-
Task::new_and_run(
179-
"Mounting devtmpfs",
180-
"mount",
181-
["devtmpfs", "-t", "devtmpfs", devdir.as_str()],
182-
)?;
178+
Task::new("Mounting devtmpfs", "mount")
179+
.args(["devtmpfs", "-t", "devtmpfs", devdir.as_str()])
180+
.quiet()
181+
.run()?;
183182

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

0 commit comments

Comments
 (0)