Only chown tmp dirs when they are a tmpfs mount
Temp dirs are created with mktemp and thus belong to the user. There is no need to chown them unless we used `mount -t tmpfs`. Move chown under the tmpfs_check conditional. Change-Id: I37efe18ced3a06d461364dc5cb20600f1527e995
This commit is contained in:
@@ -37,8 +37,8 @@ function mk_build_dir () {
|
|||||||
if tmpfs_check ; then
|
if tmpfs_check ; then
|
||||||
sudo mount -t tmpfs tmpfs $TMP_BUILD_DIR
|
sudo mount -t tmpfs tmpfs $TMP_BUILD_DIR
|
||||||
sudo mount -t tmpfs tmpfs $TMP_IMAGE_DIR
|
sudo mount -t tmpfs tmpfs $TMP_IMAGE_DIR
|
||||||
|
sudo chown $(id -u):$(id -g) $TMP_BUILD_DIR $TMP_IMAGE_DIR
|
||||||
fi
|
fi
|
||||||
sudo chown $(id -u):$(id -g) $TMP_BUILD_DIR $TMP_IMAGE_DIR
|
|
||||||
trap trap_cleanup EXIT
|
trap trap_cleanup EXIT
|
||||||
echo Building in $TMP_BUILD_DIR
|
echo Building in $TMP_BUILD_DIR
|
||||||
export TMP_IMAGE_PATH=$TMP_IMAGE_DIR/image.raw
|
export TMP_IMAGE_PATH=$TMP_IMAGE_DIR/image.raw
|
||||||
|
Reference in New Issue
Block a user