Change in osmo-ttcn3-hacks[master]: Use dumpcap for ttcn3-tcpdump-*.sh if available

osmith gerrit-no-reply at lists.osmocom.org
Mon Mar 18 14:58:39 UTC 2019


osmith has posted comments on this change. ( https://gerrit.osmocom.org/13253 )

Change subject: Use dumpcap for ttcn3-tcpdump-*.sh if available
......................................................................


Patch Set 4: Code-Review-1

(4 comments)

Supporting /usr/local/bin/dumpcap is important IMHO, the rest are nitpicks.

https://gerrit.osmocom.org/#/c/13253/4/ttcn3-tcpdump-start.sh
File ttcn3-tcpdump-start.sh:

https://gerrit.osmocom.org/#/c/13253/4/ttcn3-tcpdump-start.sh@5
PS4, Line 5: DUMPCAP=/usr/bin/dumpcap
Mine is in /usr/local/bin/dumpcap. Do we need to use the absolute path?


https://gerrit.osmocom.org/#/c/13253/4/ttcn3-tcpdump-start.sh@30
PS4, Line 30: /sbin/setcap
(might not be installed on all distributions there, I would have checked with "command")


https://gerrit.osmocom.org/#/c/13253/4/ttcn3-tcpdump-start.sh@37
PS4, Line 37: fi
How about telling the user why dumpcap is not used?

 else
 	echo "NOTE: dumpcap doesn't have cap_net_{admin,raw} (or 'setcap' is missing to check it), falling back to 'sudo tcpdump'."
 fi


https://gerrit.osmocom.org/#/c/13253/4/ttcn3-tcpdump-stop.sh
File ttcn3-tcpdump-stop.sh:

https://gerrit.osmocom.org/#/c/13253/4/ttcn3-tcpdump-stop.sh@35
PS4, Line 35:         DUMPER=`ps -q $(cat "$PIDFILE") -o comm=`
Consider replacing `` with $().

https://github.com/koalaman/shellcheck/wiki/Sc2006

 DUMPER="$(ps -q "$(cat "$PIDFILE")" -o comm=)"



-- 
To view, visit https://gerrit.osmocom.org/13253
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I77df04d51a469c924cf727f0596cc33565909746
Gerrit-Change-Number: 13253
Gerrit-PatchSet: 4
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Daniel Willmann <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: tnt <tnt at 246tNt.com>
Gerrit-Comment-Date: Mon, 18 Mar 2019 14:58:39 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190318/cbf32f55/attachment.html>


More information about the gerrit-log mailing list