Allow user to enter a description during setup

Resolves #2404
This commit is contained in:
William Wernert
2021-03-22 11:32:37 -04:00
parent e9bd3888c4
commit 50fa0dc81a
2 changed files with 18 additions and 2 deletions

View File

@@ -291,8 +291,13 @@ if ! [[ -f $install_opt_file ]]; then
[[ -f $net_init_file ]] && whiptail_net_reinit && reinit_networking=true [[ -f $net_init_file ]] && whiptail_net_reinit && reinit_networking=true
if [[ $reinit_networking ]] || ! [[ -f $net_init_file ]]; then if [[ $reinit_networking ]] || ! [[ -f $net_init_file ]]; then
collect_hostname collect_hostname
fi
whiptail_node_description
if [[ $reinit_networking ]] || ! [[ -f $net_init_file ]]; then
network_init_whiptail network_init_whiptail
else else
source "$net_init_file" source "$net_init_file"
@@ -334,7 +339,8 @@ if ! [[ -f $install_opt_file ]]; then
"MNIC=$MNIC" \ "MNIC=$MNIC" \
"HOSTNAME=$HOSTNAME" \ "HOSTNAME=$HOSTNAME" \
"MSRV=$MSRV" \ "MSRV=$MSRV" \
"MSRVIP=$MSRVIP" > "$install_opt_file" "MSRVIP=$MSRVIP" \
"NODE_DESCRIPTION=$NODE_DESCRIPTION" > "$install_opt_file"
[[ -n $so_proxy ]] && echo "so_proxy=$so_proxy" >> "$install_opt_file" [[ -n $so_proxy ]] && echo "so_proxy=$so_proxy" >> "$install_opt_file"
download_repo_tarball download_repo_tarball
exec bash /root/manager_setup/securityonion/setup/so-setup "${original_args[@]}" exec bash /root/manager_setup/securityonion/setup/so-setup "${original_args[@]}"

View File

@@ -1044,6 +1044,16 @@ whiptail_node_advanced() {
} }
whiptail_node_description() {
[ -n "$TESTING" ] && return
NODE_DESCRIPTION=$(whiptail --title "Security Onion Setup" \
--inputbox "Enter a short description for the node or press ENTER to leave blank:" 10 75 3>&1 1>&2 2>&3)
local exitstatus=$?
whiptail_check_exitstatus $exitstatus
}
whiptail_node_es_heap() { whiptail_node_es_heap() {
[ -n "$TESTING" ] && return [ -n "$TESTING" ] && return