2013-07-31 13:37:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2014-04-03 02:24:15 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
2013-07-31 13:37:57 +00:00
|
|
|
|
2023-11-22 01:56:09 +00:00
|
|
|
if [[ ${YUM} =~ "dnf" ]]; then
|
2015-05-27 04:53:04 +00:00
|
|
|
# dnf is slightly different; doesn't have these by default
|
|
|
|
cfg=/etc/dnf/dnf.conf
|
|
|
|
echo "keepcache=1" >> $cfg
|
|
|
|
echo "cachedir=/tmp/yum" >> $cfg
|
|
|
|
else
|
|
|
|
cfg=/etc/yum.conf
|
|
|
|
sed -i 's/keepcache=0/keepcache=1/' $cfg
|
|
|
|
sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' $cfg
|
|
|
|
fi
|
|
|
|
|