lib: make sure /tmp is there and mount it

This commit is contained in:
Duncan Overbruck 2020-02-17 20:37:54 +01:00 committed by Michael Aldridge
parent 3c12c74de0
commit 2b1aa4f45d

View File

@ -58,6 +58,10 @@ mount_pseudofs() {
mount -r --bind /$f "$ROOTFS/$f"
fi
done
if ! mountpoint -q "$ROOTFS/tmp" ; then
mkdir -p "$ROOTFS/tmp"
mount -o mode=0755,nosuid,nodev -t tmpfs tmpfs "$ROOTFS/tmp"
fi
}
umount_pseudofs() {
@ -71,6 +75,7 @@ umount_pseudofs() {
umount -f "$ROOTFS/$f" >/dev/null 2>&1
done
fi
umount -f "$ROOTFS/tmp" >/dev/null 2>&1
}
run_cmd_target() {