mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-14 21:22:48 +01:00
prevent hostname from being localhost in setup script - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/101
This commit is contained in:
@@ -1654,6 +1654,13 @@ whiptail_set_hostname() {
|
|||||||
HOSTNAME=$(whiptail --title "Security Onion Setup" --inputbox \
|
HOSTNAME=$(whiptail --title "Security Onion Setup" --inputbox \
|
||||||
"Enter the Hostname you would like to set." 10 60 $HOSTNAME 3>&1 1>&2 2>&3)
|
"Enter the Hostname you would like to set." 10 60 $HOSTNAME 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
while [[ "$HOSTNAME" == 'localhost' ]] ; do
|
||||||
|
whiptail --title "Security Onion Setup" --msgbox "Please choose a hostname that isn't localhost." 8 65
|
||||||
|
HOSTNAME=$(whiptail --title "Security Onion Setup" --inputbox \
|
||||||
|
"Enter the Hostname you would like to set." 10 60 $HOSTNAME 3>&1 1>&2 2>&3)
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user