From b5f656ae58d2ea2580238211f278262d82e65a3f Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 23 May 2024 13:22:22 -0400 Subject: [PATCH] dont render pillar each time so-tcpreplay runs --- salt/common/tools/{sbin => sbin_jinja}/so-tcpreplay | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename salt/common/tools/{sbin => sbin_jinja}/so-tcpreplay (92%) diff --git a/salt/common/tools/sbin/so-tcpreplay b/salt/common/tools/sbin_jinja/so-tcpreplay similarity index 92% rename from salt/common/tools/sbin/so-tcpreplay rename to salt/common/tools/sbin_jinja/so-tcpreplay index 99314c289..6f3f02983 100755 --- a/salt/common/tools/sbin/so-tcpreplay +++ b/salt/common/tools/sbin_jinja/so-tcpreplay @@ -10,7 +10,7 @@ . /usr/sbin/so-common . /usr/sbin/so-image-common -REPLAYIFACE=${REPLAYIFACE:-$(lookup_pillar interface sensor)} +REPLAYIFACE=${REPLAYIFACE:-"{{pillar.sensor.interface}}"} REPLAYSPEED=${REPLAYSPEED:-10} mkdir -p /opt/so/samples @@ -57,8 +57,8 @@ if ! docker ps | grep -q so-tcpreplay; then fi if is_sensor_node; then - echo "Replaying PCAP(s) at ${REPLAYSPEED} Mbps on interface ${REPLAYIFACE}..." - docker exec so-tcpreplay /usr/bin/bash -c "/usr/local/bin/tcpreplay -i ${REPLAYIFACE} -M${REPLAYSPEED} $@" + echo "Replaying PCAP(s) at ${REPLAYSPEED} Mbps on interface $REPLAYIFACE..." + docker exec so-tcpreplay /usr/bin/bash -c "/usr/local/bin/tcpreplay -i $REPLAYIFACE -M${REPLAYSPEED} $@" echo "Replay completed. Warnings shown above are typically expected." elif is_manager_node; then