diskimage-builder/elements/yum/root.d/50-yum-cache
Monty Taylor 3acc866f6d Use DIB_IMAGE_CACHE everywhere
disk-image-create processes a DIB_IMAGE_CACHE variable and exports it,
but there are several elements that ignore the value and wrote out
the base location themselves. Use the variable everywhere so that it
will get overridden everywhere.

Change-Id: I00fff354d6c931ad67cf3052d055f0e4604dfdc8
2014-10-05 13:58:32 -07:00

13 lines
216 B
Bash
Executable File

#!/bin/bash
set -eu
set -o pipefail
[ -n "$TARGET_ROOT" ]
YUM_CACHE_DIR=$DIB_IMAGE_CACHE/yum
mkdir -p $YUM_CACHE_DIR
sudo mkdir -p $TMP_MOUNT_PATH/tmp/yum
sudo mount --bind $YUM_CACHE_DIR $TMP_MOUNT_PATH/tmp/yum