diskimage-builder/elements/yum/post-install.d/99-reset-yum-conf
Ian Wienand b183e024ba Work around yum/dnf differences
Some minor workarounds for Fedora >= 22 where dnf is the default
package manager. The changes are documented on the Fedora release
notes https://fedoraproject.org/wiki/Changes/ReplaceYumWithDNF

Change-Id: I7d7d6f5d294980dcb217d6190a1efd9e0bbea9a6
2015-06-24 09:20:45 +10:00

16 lines
288 B
Bash
Executable file

#!/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