2014-09-12 00:59:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
set -eu
|
2014-09-12 00:59:50 +00:00
|
|
|
set -o pipefail
|
|
|
|
|
2019-09-25 04:05:18 +00:00
|
|
|
if [[ ${YUM} == "dnf" ]]; then
|
2015-05-27 04:53:04 +00:00
|
|
|
cfg=/etc/dnf/dnf.conf
|
2015-10-09 04:43:19 +00:00
|
|
|
cachedir=/var/cache/dnf
|
2015-05-27 04:53:04 +00:00
|
|
|
else
|
|
|
|
cfg=/etc/yum.conf
|
2015-10-09 04:43:19 +00:00
|
|
|
cachedir=/var/cache/yum
|
2015-05-27 04:53:04 +00:00
|
|
|
fi
|
|
|
|
|
2015-10-09 04:43:19 +00:00
|
|
|
sed -i "/^keepcache/c\keepcache=0" $cfg
|
|
|
|
sed -i "/^cachedir/c\cachedir=${cachedir}" $cfg
|