mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Add verbose flag so that so-monitor-add only sees necessary information
This commit is contained in:
@@ -41,8 +41,18 @@ add_interface_bond0() {
|
||||
fi
|
||||
done
|
||||
|
||||
case "$2" in
|
||||
-v|--verbose)
|
||||
local verbose=true
|
||||
;;
|
||||
esac
|
||||
|
||||
for i in rx tx sg tso ufo gso gro lro; do
|
||||
if [[ $verbose != true ]]; then
|
||||
ethtool -K "$BNIC" $i off
|
||||
else
|
||||
ethtool -K "$BNIC" $i off &>/dev/null
|
||||
fi
|
||||
done
|
||||
# Check if the bond slave connection has already been created
|
||||
nmcli -f name,uuid -p con | grep -q "bond0-slave-$BNIC"
|
||||
@@ -64,7 +74,12 @@ add_interface_bond0() {
|
||||
|
||||
ip link set dev "$BNIC" arp off multicast off allmulticast off promisc on
|
||||
|
||||
nmcli con up "bond0-slave-$BNIC" # Bring the slave interface up
|
||||
# Bring the slave interface up
|
||||
if [[ $verbose != true ]]; then
|
||||
nmcli con up "bond0-slave-$BNIC"
|
||||
else
|
||||
nmcli con up "bond0-slave-$BNIC" &>/dev/null
|
||||
fi
|
||||
|
||||
if [ "$nic_error" != 0 ]; then
|
||||
return "$nic_error"
|
||||
|
||||
@@ -884,7 +884,7 @@ configure_network_sensor() {
|
||||
|
||||
local err=0
|
||||
for BNIC in "${BNICS[@]}"; do
|
||||
add_interface_bond0 "$BNIC" >> "$setup_log" 2>&1
|
||||
add_interface_bond0 "$BNIC" --verbose >> "$setup_log" 2>&1
|
||||
local ret=$?
|
||||
[[ $ret -eq 0 ]] || err=$ret
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user