Skip to content

Commit 2b1aa4f

Browse files
Duncaenthe-maldridge
authored andcommitted
lib: make sure /tmp is there and mount it
1 parent 3c12c74 commit 2b1aa4f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib.sh.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ mount_pseudofs() {
5858
mount -r --bind /$f "$ROOTFS/$f"
5959
fi
6060
done
61+
if ! mountpoint -q "$ROOTFS/tmp" ; then
62+
mkdir -p "$ROOTFS/tmp"
63+
mount -o mode=0755,nosuid,nodev -t tmpfs tmpfs "$ROOTFS/tmp"
64+
fi
6165
}
6266

6367
umount_pseudofs() {
@@ -71,6 +75,7 @@ umount_pseudofs() {
7175
umount -f "$ROOTFS/$f" >/dev/null 2>&1
7276
done
7377
fi
78+
umount -f "$ROOTFS/tmp" >/dev/null 2>&1
7479
}
7580

7681
run_cmd_target() {

0 commit comments

Comments
 (0)