diskimage-builder/elements/yum/post-install.d/99-reset-yum-conf

17 lines
288 B
Plaintext
Raw Normal View History

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
if [ $DIB_RELEASE -ge 22 ]; then
cfg=/etc/dnf/dnf.conf
else
cfg=/etc/yum.conf
fi
sed -i 's/keepcache=1/keepcache=0/' $cfg
sed -i 's/cachedir=\/tmp\/yum/cachedir=\/var\/cache\/yum/' $cfg