desktop network install nongrid

This commit is contained in:
m0duspwnens
2023-08-30 09:10:59 -04:00
parent a4dc482372
commit ae01da780e
3 changed files with 37 additions and 32 deletions

View File

@@ -1883,7 +1883,7 @@ securityonion_repo() {
if [ -n "$(ls -A /etc/yum.repos.d/ 2>/dev/null)" ]; then if [ -n "$(ls -A /etc/yum.repos.d/ 2>/dev/null)" ]; then
logCmd "mv -v /etc/yum.repos.d/* /root/oldrepos/" logCmd "mv -v /etc/yum.repos.d/* /root/oldrepos/"
fi fi
if [[ ! $is_desktop_grid ]]; then if ! $is_desktop_grid; then
gpg_rpm_import gpg_rpm_import
if [[ ! $is_airgap ]]; then if [[ ! $is_airgap ]]; then
echo "https://repo.securityonion.net/file/so-repo/prod/2.4/oracle/9" > /etc/yum/mirror.txt echo "https://repo.securityonion.net/file/so-repo/prod/2.4/oracle/9" > /etc/yum/mirror.txt

View File

@@ -333,38 +333,39 @@ if [[ $is_desktop ]]; then
exit 1 exit 1
fi fi
if ! whiptail_desktop_install; then whiptail_desktop_install
if [[ $is_desktop_iso ]]; then if ! is_desktop_grid; then
if whiptail_desktop_nongrid_iso; then if [[ $is_desktop_iso ]]; then
# Remove setup from auto launching if whiptail_desktop_nongrid_iso; then
parse_install_username # Remove setup from auto launching
sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1 parse_install_username
securityonion_repo sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1
info "Enabling graphical interface and setting it to load at boot" securityonion_repo
systemctl set-default graphical.target info "Enabling graphical interface and setting it to load at boot"
info "Setting desktop background" systemctl set-default graphical.target
set_desktop_background info "Setting desktop background"
echo "Desktop Install Complete!" set_desktop_background
echo "" echo "Desktop Install Complete!"
echo "Please reboot to start graphical interface." echo ""
exit 0 echo "Please reboot to start graphical interface."
exit 0
else
# Abort!
exit 0
fi
else else
# Abort! if whiptail_desktop_nongrid_network; then
exit 0 info ""
info ""
info "Kicking off the automated setup of the Security Onion Desktop. This can take a while depending on your network connection."
info ""
info ""
desktop_salt_local
else
# Abort!
exit 0
fi
fi fi
else
if whiptail_desktop_nongrid_network; then
info ""
info ""
info "Kicking off the automated setup of the Security Onion Desktop. This can take a while depending on your network connection."
info ""
info ""
desktop_salt_local
else
# Abort!
exit 0
fi
fi
fi fi
# If you got this far then you want to join the grid # If you got this far then you want to join the grid

View File

@@ -58,7 +58,11 @@ whiptail_desktop_install() {
whiptail --title "$whiptail_title" \ whiptail --title "$whiptail_title" \
--yesno "$message" 11 75 --defaultno --yesno "$message" 11 75 --defaultno
is_desktop_grid=$? if [ $? -eq 0 ]; then
is_desktop_grid=true
else
is_desktop_grid=false
fi
} }