Remove use of sudo from yum pre and post elements

sudo is not needed, since in-chroot elements are run in the context
of the root user. Furthermore, sudo in pre-install is problematic as
sudo may not have been installed yet (imagine a debootstrap build)

Change-Id: Ib5c7e176a90fe3b8fa9c3cd702d3d815df54f472
This commit is contained in:
Monty Taylor 2014-11-23 12:53:38 -05:00
parent 019196ef7f
commit 9cd5068854
2 changed files with 4 additions and 4 deletions

View File

@ -3,5 +3,5 @@
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
sed -i 's/keepcache=1/keepcache=0/' /etc/yum.conf
sed -i 's/cachedir=\/tmp\/yum/cachedir=\/var\/cache\/yum/' /etc/yum.conf

View File

@ -3,5 +3,5 @@
set -eu
set -o pipefail
sudo sed -i 's/keepcache=0/keepcache=1/' /etc/yum.conf
sudo sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' /etc/yum.conf
sed -i 's/keepcache=0/keepcache=1/' /etc/yum.conf
sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' /etc/yum.conf