From dba7b84adb797b7aed860d3791b4d97e012231d2 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Wed, 12 Apr 2023 19:02:04 -0400 Subject: [PATCH] discover appliance model grain during setup --- setup/so-functions | 9 +++++---- setup/so-setup | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index 7520122db..98bc84c46 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -770,11 +770,12 @@ check_requirements() { } check_sos_appliance() { - title "Is this is an SOS Appliance?" if [ -f "/etc/SOSMODEL" ]; then - local MODEL=$(cat /etc/SOSMODEL) - info "Found SOS Model $MODEL" - echo "sosmodel: $MODEL" >> /etc/salt/grains + local MODEL=$(cat /etc/SOSMODEL) + info "Found SOS Model $MODEL" + echo "sosmodel: $MODEL" >> /etc/salt/grains + else + info "Not an appliance" fi } diff --git a/setup/so-setup b/setup/so-setup index f10ff8c48..cb0c25fab 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -594,6 +594,7 @@ if ! [[ -f $install_opt_file ]]; then # Start the master service copy_salt_master_config configure_minion "$minion_type" + check_sos_appliance logCmd "salt-key -yd $MINION_ID" logCmd "salt-call state.show_top" @@ -656,6 +657,7 @@ if ! [[ -f $install_opt_file ]]; then update_packages saltify configure_minion "$minion_type" + check_sos_appliance drop_install_options checkin_at_boot logCmd "salt-call state.apply setup.highstate_cron --local --file-root=../salt/"