mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-09 23:34:51 +01:00
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:
parent
2fffb45748
commit
d232e76905
1 changed files with 1 additions and 3 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue