From 62cc02301e66da5df7e23bc370a490fe15e3aea0 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Tue, 7 Jul 2020 10:28:15 -0400 Subject: [PATCH] Do not attempt to install a plugin or bc command if already exists --- setup/so-functions | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index cd81074f2..3e4fa718b 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -617,7 +617,12 @@ detect_os() { systemctl start NetworkManager; } >> "$setup_log" 2<&1 fi - yum -y install yum-plugin-versionlock bc >> "$setup_log" 2>&1 + if ! command -v bc > /dev/null 2>&1; then + yum -y install bc >> "$setup_log" 2>&1 + fi + if ! yum versionlock > /dev/null 2>&1; then + yum -y install yum-plugin-versionlock >> "$setup_log" 2>&1 + fi elif [ -f /etc/os-release ]; then