From 8175a7ef4d386f5bc0904138291cb977af15fceb Mon Sep 17 00:00:00 2001 From: James Slagle Date: Thu, 11 Sep 2014 20:59:50 -0400 Subject: [PATCH] Reset yum configuration in post-install.d When using the yum element, we should reset the changes we've made to /etc/yum.conf during post-install.d. Otherwise, this build time configuration is propagated into booted instances. Change-Id: I1eea586ca0fefe9bc0cf91fedefcbd141a536fa2 --- elements/yum/post-install.d/99-reset-yum-conf | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 elements/yum/post-install.d/99-reset-yum-conf diff --git a/elements/yum/post-install.d/99-reset-yum-conf b/elements/yum/post-install.d/99-reset-yum-conf new file mode 100755 index 00000000..e875848a --- /dev/null +++ b/elements/yum/post-install.d/99-reset-yum-conf @@ -0,0 +1,7 @@ +#!/bin/bash + +set -eux +set -o pipefail + +sudo sed -i 's/keepcache=1/keepcache=0/' /etc/yum.conf +sudo sed -i 's/cachedir=\/tmp\/yum/cachedir=\/var\/cache\/yum/' /etc/yum.conf