Merge "Reset yum/dnf cache to correct location"
This commit is contained in:
commit
21f5e6146c
@ -8,9 +8,11 @@ set -o pipefail
|
|||||||
|
|
||||||
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
||||||
cfg=/etc/dnf/dnf.conf
|
cfg=/etc/dnf/dnf.conf
|
||||||
|
cachedir=/var/cache/dnf
|
||||||
else
|
else
|
||||||
cfg=/etc/yum.conf
|
cfg=/etc/yum.conf
|
||||||
|
cachedir=/var/cache/yum
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i 's/keepcache=1/keepcache=0/' $cfg
|
sed -i "/^keepcache/c\keepcache=0" $cfg
|
||||||
sed -i 's/cachedir=\/tmp\/yum/cachedir=\/var\/cache\/yum/' $cfg
|
sed -i "/^cachedir/c\cachedir=${cachedir}" $cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user