From d232e76905ae1d243a209f68b0760b5f9b152021 Mon Sep 17 00:00:00 2001 From: Andreas Gnau Date: Wed, 27 Aug 2025 20:28:48 +0200 Subject: [PATCH] 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 --- packet-capture-diagnostics/files/scripts/packetcapture | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packet-capture-diagnostics/files/scripts/packetcapture b/packet-capture-diagnostics/files/scripts/packetcapture index d170fcdc6..2f73f81af 100644 --- a/packet-capture-diagnostics/files/scripts/packetcapture +++ b/packet-capture-diagnostics/files/scripts/packetcapture @@ -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}"