diskimage-builder/elements/yum/root.d/50-yum-cache
Ralf Haferkamp ba5aa8725e Fix $TARGET_ROOT usage in yum element
Fix the test for $TARGET_ROOT in root.d/50-yum-cache.

Don't use $TARGET_ROOT in pre-install, it's only set for "root" and "cleanup".

Change-Id: I048364ea08ef503a4466f3494f18f72ebf99b5c2
2013-12-10 17:56:42 +01:00

12 lines
204 B
Bash
Executable File

#!/bin/bash
set -e
[ -n "$TARGET_ROOT" ]
YUM_CACHE_DIR=~/.cache/image-create/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