diskimage-builder/elements/yum/pre-install.d/01-yum-keepcache
James Slagle c9a6aef9f4 Add yum element.
The yum element provides for specific customizations
for yum based distros.  The included customization is
a yum cache mounted outside of the chroot so that yum
downloaded packages are reused on subsequent image builds.

Change-Id: I6833c9fdbc83cb09debec6a789082e105c917800
2013-08-14 18:26:51 -04:00

8 lines
200 B
Bash
Executable file

#!/bin/bash
set -e
[ -n "TARGET_ROOT" ]
sudo sed -i 's/keepcache=0/keepcache=1/' $TARGET_ROOT/etc/yum.conf
sudo sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' $TARGET_ROOT/etc/yum.conf