b57714af75
A few places we either assume centos uses "yum" directly, or have switching based on the distro type. In both cases, we can use ${YUM} directly to avoid ambiguity Change-Id: I71095a9bd1862f8956b5982fbbb3e1d213926c14
19 lines
425 B
Bash
Executable file
19 lines
425 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [[ ${YUM} == "dnf" ]]; then
|
|
# 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
|
|
|