mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Don't redirect whiptail message, use SIGINT instead of SIGKILL
This commit is contained in:
@@ -1772,15 +1772,17 @@ set_network_dev_status_list() {
|
|||||||
set_main_ip() {
|
set_main_ip() {
|
||||||
MAINIP=$(ip route get 1 | awk '{print $7;exit}')
|
MAINIP=$(ip route get 1 | awk '{print $7;exit}')
|
||||||
MNIC_IP=$(ip a s "$MNIC" | grep -oE 'inet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | cut -d' ' -f2)
|
MNIC_IP=$(ip a s "$MNIC" | grep -oE 'inet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | cut -d' ' -f2)
|
||||||
|
}
|
||||||
|
|
||||||
if [[ $MAINIP != $MNIC_IP ]]; then
|
compare_main_nic_ip() {
|
||||||
|
if [[ "$MAINIP" != "$MNIC_IP" ]]; then
|
||||||
read -r -d '' message <<- EOM
|
read -r -d '' message <<- EOM
|
||||||
The IP being routed by Linux is not the IP address assigned to the management interface ($MNIC).
|
The IP being routed by Linux is not the IP address assigned to the management interface ($MNIC).
|
||||||
|
|
||||||
This is not a supported configuration, please remediate and rerun setup.
|
This is not a supported configuration, please remediate and rerun setup.
|
||||||
EOM
|
EOM
|
||||||
whiptail --title "Security Onion Setup" --msgbox "$message" 10 75
|
whiptail --title "Security Onion Setup" --msgbox "$message" 10 75
|
||||||
kill -SIGKILL "$(ps --pid $$ -oppid=)"; exit 1
|
kill -SIGINT "$(ps --pid $$ -oppid=)"; exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user