From f795751c1e97c3b76d9eda5677a66f5be5d0eb9a Mon Sep 17 00:00:00 2001 From: Fierelier Date: Tue, 10 May 2022 22:52:22 +0200 Subject: [PATCH] Separate chroot mount and unmount --- path/fchroot | 5 +---- path/fchroot-end | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100755 path/fchroot-end diff --git a/path/fchroot b/path/fchroot index ec613fb..f09e9ba 100755 --- a/path/fchroot +++ b/path/fchroot @@ -5,7 +5,4 @@ mount -o bind "/dev/pts" "$1/dev/pts" mount -o bind "/sys" "$1/sys" mount -o bind "/proc" "$1/proc" chroot "$1" ${@:2} -umount -l "$1/proc" -umount -l "$1/sys" -umount -l "$1/dev/pts" -umount -l "$1/dev" \ No newline at end of file +fchroot-end "$1" \ No newline at end of file diff --git a/path/fchroot-end b/path/fchroot-end new file mode 100755 index 0000000..3785f34 --- /dev/null +++ b/path/fchroot-end @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +umount -l "$1/proc" +umount -l "$1/sys" +umount -l "$1/dev/pts" +umount -l "$1/dev" \ No newline at end of file