mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
image_builder: Force mount_dir to be created in $TMPDIR
Immutable systems, as such Red Hat Core OS and Fedora Core OS, will not allow mount_dir to be created in a location that's not read-write. Let's ensure we use $TMPDIR (with /tmp as fallback) as base for mount_dir, as it's a safe writable choice for any distro supported by kata. Fixes: #437 Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
parent
4f49b160c0
commit
9665563145
@ -374,7 +374,7 @@ create_rootfs_image() {
|
||||
fi
|
||||
|
||||
info "Mounting root partition"
|
||||
readonly mount_dir=$(mktemp -d osbuilder-mount-dir.XXXX)
|
||||
readonly mount_dir=$(mktemp -p ${TMPDIR:-/tmp} -d osbuilder-mount-dir.XXXX)
|
||||
mount "${device}p1" "${mount_dir}"
|
||||
OK "root partition mounted"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user