From 6b480a5ba448569c7a024dbbb18afd13dab16441 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Thu, 28 Oct 2021 11:51:50 -0400 Subject: [PATCH] Change airgap check to something that doesn't require root --- setup/so-setup | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/so-setup b/setup/so-setup index e9d510270..b423160c8 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -332,8 +332,9 @@ if [[ ( $is_manager || $is_import) && $is_iso ]]; then is_airgap=true fi elif [[ $is_minion ]]; then - airgap_mngr_str=$($sshcmd -i /root/.ssh/so.key soremote@"$MSRV" cat /opt/so/saltstack/local/pillar/global.sls | grep airgap: | awk '{print $2}') >> $setup_log 2>&1 - [[ $airgap_mngr_str == "True" ]] && is_airgap=true >> $setup_log 2>&1 + $sshcmd -i /root/.ssh/so.key soremote@"$MSRV" [[ -f /etc/yum.repos.d/airgap_repo.repo ]] >> $setup_log 2>&1 + airgap_check=$? + [[ $airgap_check ]] && is_airgap=true >> $setup_log 2>&1 fi reset_proxy