Monitor interface will not always be bond0 - pull correct value from pillar; Replay test data after automated test installations complete.

This commit is contained in:
Jason Ertel
2020-12-29 10:34:27 -05:00
parent afe40fe87b
commit ea5e25c4a5
2 changed files with 5 additions and 3 deletions

View File

@@ -20,9 +20,11 @@
. /usr/sbin/so-common
. /usr/sbin/so-image-common
REPLAYIFACE=${REPLAYIFACE:-bond0}
REPLAYIFACE=${REPLAYIFACE:-$(lookup_pillar interface sensor)}
REPLAYSPEED=${REPLAYSPEED:-10}
mkdir -p /opt/so/samples
if [[ $# -lt 1 ]]; then
echo "Replays one or more PCAP sample files to the Security Onion monitoring interface."
echo
@@ -48,8 +50,6 @@ if ! docker ps | grep -q so-tcpreplay; then
TRUSTED_CONTAINERS=("so-tcpreplay")
update_docker_containers "tcpreplay"
so-tcpreplay-start || fail "Unable to initialize tcpreplay"
mkdir -p /opt/so/samples
docker cp so-tcpreplay:/opt/samples/* /opt/so/samples
fi
echo "Replaying PCAP(s) at ${REPLAYSPEED} Mbps on interface ${REPLAYIFACE}..."

View File

@@ -842,6 +842,8 @@ if [[ -n $SO_ERROR ]]; then
else
echo "Successfully completed setup! Continuing with post-installation steps" >> $setup_log 2>&1
{
[ -n "$TESTING" ] && so-test
export percentage=95 # set to last percentage used in previous subshell
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
set_progress_str 97 "Running so-allow -${ALLOW_ROLE} for ${ALLOW_CIDR}"