From 5c5a97ca751be841e85c4723d5eb1a727230f97b Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 27 Apr 2020 12:10:59 -0400 Subject: [PATCH] [fix] Change order of ip link parsing --- setup/so-common-functions | 2 +- setup/so-functions | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/setup/so-common-functions b/setup/so-common-functions index 824e51f21..15cb3e686 100644 --- a/setup/so-common-functions +++ b/setup/so-common-functions @@ -17,7 +17,7 @@ filter_unused_nics() { fi # Finally, set filtered_nics to any NICs we aren't using (and ignore interfaces that aren't of use) - filtered_nics=$(ip link | grep -vwe "$grep_string" | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2}' | sed 's/ //') + filtered_nics=$(ip link| awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2}' | grep -vwe "$grep_string" | sed 's/ //g') readarray -t filtered_nics <<< "$filtered_nics" nic_list=() diff --git a/setup/so-functions b/setup/so-functions index 8353bb7fd..88d4ccdf1 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -534,10 +534,13 @@ disable_misc_network_features() { docker_install() { if [ $OS = 'centos' ]; then - yum clean expire-cache >> "$setup_log" 2>&1 - yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo >> "$setup_log" 2>&1 - yum -y update >> "$setup_log" 2>&1 - yum -y install docker-ce >> "$setup_log" 2>&1 + { + yum clean expire-cache; + yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo; + yum -y update; + yum -y install docker-ce; + } >> "$setup_log" 2>&1 + else case "$install_type" in 'MASTER' | 'EVAL') @@ -962,8 +965,7 @@ saltify() { case "$install_type" in 'MASTER' | 'EVAL' | 'MASTERSEARCH' | 'FLEET' | 'HELIXSENSOR') reserve_group_ids >> "$setup_log" 2>&1 - yum -y install epel-release >> "$setup_log" 2>&1 - yum -y install sqlite3 argon2 curl jq openssl mariadb-devel >> "$setup_log" 2>&1 + yum -y install epel-release sqlite3 argon2 curl mariadb-devel >> "$setup_log" 2>&1 # Download Ubuntu Keys in case master updates = 1 mkdir -p /opt/so/gpg >> "$setup_log" 2>&1 wget --inet4-only -O /opt/so/gpg/SALTSTACK-GPG-KEY.pub https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub >> "$setup_log" 2>&1 @@ -1058,7 +1060,7 @@ saltify() { apt-get update >> "$setup_log" 2>&1 # FIXME: Install salt-master on Ubuntu? set_progress_str 6 'Installing various dependencies' - apt-get -y install sqlite3 argon2 openssl libssl-dev >> "$setup_log" 2>&1 + apt-get -y install sqlite3 argon2 libssl-dev >> "$setup_log" 2>&1 set_progress_str 7 'Installing salt-master' apt-get -y salt-master=2019.2.3+ds-1 >> "$setup_log" 2>&1 apt-mark hold salt-master >> "$setup_log" 2>&1