From 053eadbb39b0420515f632968b18b53183e7b86b Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Thu, 20 Mar 2025 16:58:16 -0400 Subject: [PATCH] fix SALTVERSION grep to work with or without quote --- setup/so-functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index fffa1a932..b97d4bb52 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -95,7 +95,7 @@ analyze_system() { desktop_salt_local() { - SALTVERSION=$(egrep 'version: [0-9]{4}' ../salt/salt/master.defaults.yaml | sed 's/^.*version: //') + SALTVERSION=$(grep "version:" ../salt/salt/master.defaults.yaml | grep -o "[0-9]\+\.[0-9]\+") # Install everything using local salt # Set the repo securityonion_repo @@ -1817,7 +1817,7 @@ securityonion_repo() { } repo_sync_local() { - SALTVERSION=$(egrep 'version: [0-9]{4}' ../salt/salt/master.defaults.yaml | sed 's/^.*version: //') + SALTVERSION=$(grep "version:" ../salt/salt/master.defaults.yaml | grep -o "[0-9]\+\.[0-9]\+") info "Repo Sync" if [[ $is_supported ]]; then # Sync the repo from the the SO repo locally. @@ -1878,7 +1878,7 @@ repo_sync_local() { saltify() { info "Installing Salt" - SALTVERSION=$(egrep 'version: [0-9]{4}' ../salt/salt/master.defaults.yaml | sed 's/^.*version: //') + SALTVERSION=$(grep "version:" ../salt/salt/master.defaults.yaml | grep -o "[0-9]\+\.[0-9]\+") if [[ $is_deb ]]; then DEBIAN_FRONTEND=noninteractive retry 150 20 "apt-get -y -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" upgrade" >> "$setup_log" 2>&1 || fail_setup