From 7e2bdd7568f161980dcd37ab1fa1bcafb2ee2a30 Mon Sep 17 00:00:00 2001 From: David Bajzath Date: Wed, 15 Sep 2021 11:44:10 +0200 Subject: [PATCH] CDPR-44 Fix /etc/yum.conf append --- scripts/salt-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/salt-install.sh b/scripts/salt-install.sh index af37fb6cb..ad5c1ef0e 100755 --- a/scripts/salt-install.sh +++ b/scripts/salt-install.sh @@ -78,10 +78,10 @@ function install_with_yum() { yum install -y zeromq zeromq-devel fi install_python_pip - if [ ! -z $(grep "^exclude=" /etc/yum.conf) ]; then - sed -i 's/^exclude=.*$/& salt/g' /etc/yum.conf - else + if [ -z "$(grep "^exclude=" /etc/yum.conf)" ]; then echo "exclude=salt" >> /etc/yum.conf + else + sed -i 's/^exclude=.*$/& salt/g' /etc/yum.conf fi install_salt_with_pip create_temp_minion_config