diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2023-03-29 07:59:56 +0100 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2023-03-29 07:59:56 +0100 |
| commit | 0defafedd4ab1b5dd3a97125b6d461eef581a7c6 (patch) | |
| tree | 0dc78a87eb8ca2e326378dab26d7bea1b04dee4c /scripts/common | |
| parent | 84746b2bcdf1bff48727745b5c21bb67554f60e8 (diff) | |
| parent | 4e9275398278c4cab8ba68f3d9ca54ab97b73922 (diff) | |
Merge branch 'master' into arm64
Diffstat (limited to 'scripts/common')
| -rw-r--r-- | scripts/common | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/common b/scripts/common index 1bb68a2..7236896 100644 --- a/scripts/common +++ b/scripts/common @@ -87,6 +87,14 @@ on_chroot() { mount --bind /sys "${ROOTFS_DIR}/sys" fi + if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/run)"; then + mount -t tmpfs tmpfs "${ROOTFS_DIR}/run" + fi + + if ! mount | grep -q "$(realpath "${ROOTFS_DIR}"/tmp)"; then + mount -t tmpfs tmpfs "${ROOTFS_DIR}/tmp" + fi + capsh $CAPSH_ARG "--chroot=${ROOTFS_DIR}/" -- -e "$@" } export -f on_chroot |
