diff --git a/elements/yum/pre-install.d/01-yum-keepcache b/elements/yum/pre-install.d/01-yum-keepcache index 2ada3e0b..e5d7b145 100755 --- a/elements/yum/pre-install.d/01-yum-keepcache +++ b/elements/yum/pre-install.d/01-yum-keepcache @@ -2,7 +2,5 @@ set -e -[ -n "TARGET_ROOT" ] - -sudo sed -i 's/keepcache=0/keepcache=1/' $TARGET_ROOT/etc/yum.conf -sudo sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' $TARGET_ROOT/etc/yum.conf +sudo sed -i 's/keepcache=0/keepcache=1/' /etc/yum.conf +sudo sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' /etc/yum.conf diff --git a/elements/yum/root.d/50-yum-cache b/elements/yum/root.d/50-yum-cache index f7dd9247..a1e43a55 100755 --- a/elements/yum/root.d/50-yum-cache +++ b/elements/yum/root.d/50-yum-cache @@ -2,7 +2,7 @@ set -e -[ -n "TARGET_ROOT" ] +[ -n "$TARGET_ROOT" ] YUM_CACHE_DIR=~/.cache/image-create/yum mkdir -p $YUM_CACHE_DIR