diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-06-23 01:11:14 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-06-23 01:11:14 -0500 |
commit | ca5486725468e69569ff352d0d075e8081e1e22d (patch) | |
tree | 1db6c4c9561cec5191462296eae5dd5cf150c549 /image | |
parent | 6a5af0c939b2f60a739b1a9a7e2514036b1d94fd (diff) | |
download | horizon-ca5486725468e69569ff352d0d075e8081e1e22d.tar.gz horizon-ca5486725468e69569ff352d0d075e8081e1e22d.tar.bz2 horizon-ca5486725468e69569ff352d0d075e8081e1e22d.tar.xz horizon-ca5486725468e69569ff352d0d075e8081e1e22d.zip |
hscript: Recursively bind-mount /dev and /sys
We need this for /dev/shm to be present in the target.
We need to bind-mount /sys recursively for efivarfs to be available for
GRUB's use in the target.
While we're here, unmount /dev and /sys recursively when creating an image.
Diffstat (limited to 'image')
-rw-r--r-- | image/creator.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/image/creator.cc b/image/creator.cc index 1a064f1..a95e743 100644 --- a/image/creator.cc +++ b/image/creator.cc @@ -22,6 +22,7 @@ #include "backends/basic.hh" #include "hscript/meta.hh" #include "hscript/script.hh" +#include "hscript/util.hh" #include "util/filesystem.hh" #include "util/output.hh" @@ -247,9 +248,9 @@ int main(int argc, char *argv[]) { trouble: /* delete the Script and exit */ /* ensure that our target mounts are unmounted */ - umount((ir_dir + "/target/sys").c_str()); + run_command("umount", {"-R", (ir_dir + "/target/sys")}); umount((ir_dir + "/target/proc").c_str()); - umount((ir_dir + "/target/dev").c_str()); + run_command("umount", {"-R", (ir_dir + "/target/dev")}); delete my_script; early_trouble: /* no script yet */ |