diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-30 23:40:08 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-30 23:40:08 +0200 |
commit | e3119a77bfe4be98b721dfe262b01e2c328c3c79 (patch) | |
tree | 3e2c24a25e7423249255b1d0c625c84230e45a8e /crates/runner/src/tar.rs | |
parent | fb775e85a4563a063daaf87cdf510e1d46647294 (diff) | |
download | rebel-e3119a77bfe4be98b721dfe262b01e2c328c3c79.tar rebel-e3119a77bfe4be98b721dfe262b01e2c328c3c79.zip |
runner: set up /dev in separate directory
Preparation for removal of a single rootfs.
Diffstat (limited to 'crates/runner/src/tar.rs')
-rw-r--r-- | crates/runner/src/tar.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/runner/src/tar.rs b/crates/runner/src/tar.rs index 3fd21e7..32d8e8d 100644 --- a/crates/runner/src/tar.rs +++ b/crates/runner/src/tar.rs @@ -24,6 +24,14 @@ pub fn pack<W: Write, P: AsRef<Path>>(archive: &mut W, source: P) -> Result<()> let exec_tar = || -> Result<()> { // We are in our own mount namespace, so mounting into the shared ROOTFS_DIR is fine + let dev_target = paths::join(&[paths::ROOTFS_DIR, "dev"]); + mount::mount::<_, _, str, str>( + Some(paths::DEV_DIR), + dev_target.as_str(), + None, + MsFlags::MS_BIND | MsFlags::MS_REC, + None, + )?; let mount_target = paths::join(&[paths::ROOTFS_DIR, paths::TASK_BUILDDIR]); mount::mount::<_, _, str, str>( Some(source.as_ref()), |