mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
case "$2" in
|
||||||
|
-v|--verbose)
|
||||||
|
local verbose=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
for i in rx tx sg tso ufo gso gro lro; do
|
for i in rx tx sg tso ufo gso gro lro; do
|
||||||
|
if [[ $verbose != true ]]; then
|
||||||
ethtool -K "$BNIC" $i off
|
ethtool -K "$BNIC" $i off
|
||||||
|
else
|
||||||
|
ethtool -K "$BNIC" $i off &>/dev/null
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
# Check if the bond slave connection has already been created
|
# Check if the bond slave connection has already been created
|
||||||
nmcli -f name,uuid -p con | grep -q "bond0-slave-$BNIC"
|
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
|
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
|
if [ "$nic_error" != 0 ]; then
|
||||||
return "$nic_error"
|
return "$nic_error"
|
||||||
|
|||||||
@@ -884,7 +884,7 @@ configure_network_sensor() {
|
|||||||
|
|
||||||
local err=0
|
local err=0
|
||||||
for BNIC in "${BNICS[@]}"; do
|
for BNIC in "${BNICS[@]}"; do
|
||||||
add_interface_bond0 "$BNIC" >> "$setup_log" 2>&1
|
add_interface_bond0 "$BNIC" --verbose >> "$setup_log" 2>&1
|
||||||
local ret=$?
|
local ret=$?
|
||||||
[[ $ret -eq 0 ]] || err=$ret
|
[[ $ret -eq 0 ]] || err=$ret
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user