packet-capture-diagnostics: Don't use jq

jq is used inside packetcapture but it is not declared as a dependency.
Remove this usage of jq.

jq is a complex piece of software that requires security maintenance and
adds bloat to the image. Using existing tools like jshn and jsonfilter
is preferred where the additional functionality provided by jq is not
required.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
This commit is contained in:
Andreas Gnau 2025-08-27 20:28:48 +02:00
parent 2fffb45748
commit d232e76905
No known key found for this signature in database

View file

@ -97,15 +97,13 @@ packet_capture_launch() {
fi
if [ -n "${interface}" ]; then
intf=$(ifstatus "${interface}" | jq ".l3_device")
intf=$(ifstatus "${interface}" | jsonfilter -e '$.l3_device')
if [ -z "${intf}" ]; then
# Error
packet_capture_error "Error_Internal" "${proto}"
return
fi
intf=$(eval echo "${intf}")
fi
cmd="timeout ${duration} tcpdump -w ${filename}"