On Mon, Apr 11, 2022 at 17:20, Vladimir Oltean <[email protected]> wrote:
> On Mon, Apr 11, 2022 at 03:38:29PM +0200, Joachim Wiberg wrote:
>> -    $ns_cmd tcpdump -e -n -Q in -i $if_name \
>> +    if [ -z $TCPDUMP_EXTRA_FLAGS ]; then
>> +            extra_flags=""
>> +    else
>> +            extra_flags="$TCPDUMP_EXTRA_FLAGS"
>> +    fi
>> +
>> +    $ns_cmd tcpdump $extra_flags -e -n -Q in -i $if_name \
>
> Could you call directly "$ns_cmd tcpdump $TCPDUMP_EXTRA_FLAGS ..." here,
> without an intermediary "extra_flags" global variable which holds the
> same content?
>
> You could initialize it just like the way other variables are
> initialized, at the beginning of lib.sh:
>
> TCPDUMP_EXTRA_FLAGS=${TCPDUMP_EXTRA_FLAGS:=}

Ah, yes of course.  Will fix in the next drop!

 /J
 

Reply via email to