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
This commit is contained in:
Ralf Haferkamp 2013-12-10 17:24:03 +01:00
parent 31ff8235a3
commit ba5aa8725e
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -2,7 +2,7 @@
set -e
[ -n "TARGET_ROOT" ]
[ -n "$TARGET_ROOT" ]
YUM_CACHE_DIR=~/.cache/image-create/yum
mkdir -p $YUM_CACHE_DIR