mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
discover appliance model grain during setup
This commit is contained in:
@@ -770,11 +770,12 @@ check_requirements() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_sos_appliance() {
|
check_sos_appliance() {
|
||||||
title "Is this is an SOS Appliance?"
|
|
||||||
if [ -f "/etc/SOSMODEL" ]; then
|
if [ -f "/etc/SOSMODEL" ]; then
|
||||||
local MODEL=$(cat /etc/SOSMODEL)
|
local MODEL=$(cat /etc/SOSMODEL)
|
||||||
info "Found SOS Model $MODEL"
|
info "Found SOS Model $MODEL"
|
||||||
echo "sosmodel: $MODEL" >> /etc/salt/grains
|
echo "sosmodel: $MODEL" >> /etc/salt/grains
|
||||||
|
else
|
||||||
|
info "Not an appliance"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -594,6 +594,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
# Start the master service
|
# Start the master service
|
||||||
copy_salt_master_config
|
copy_salt_master_config
|
||||||
configure_minion "$minion_type"
|
configure_minion "$minion_type"
|
||||||
|
check_sos_appliance
|
||||||
|
|
||||||
logCmd "salt-key -yd $MINION_ID"
|
logCmd "salt-key -yd $MINION_ID"
|
||||||
logCmd "salt-call state.show_top"
|
logCmd "salt-call state.show_top"
|
||||||
@@ -656,6 +657,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
update_packages
|
update_packages
|
||||||
saltify
|
saltify
|
||||||
configure_minion "$minion_type"
|
configure_minion "$minion_type"
|
||||||
|
check_sos_appliance
|
||||||
drop_install_options
|
drop_install_options
|
||||||
checkin_at_boot
|
checkin_at_boot
|
||||||
logCmd "salt-call state.apply setup.highstate_cron --local --file-root=../salt/"
|
logCmd "salt-call state.apply setup.highstate_cron --local --file-root=../salt/"
|
||||||
|
|||||||
Reference in New Issue
Block a user