osmith uploaded patch set #2 to this change.

View Change

tcpdump/dumpcap: move kill_rm_pidfile to inc file

Move kill_rm_pidfile out of the 4 ttcn3 tcpdump/dumpcap scripts into a
shared include file. Use the version of the function that only tries to
kill the command with sudo if it was started with sudo.

This fixes dumpcap not stopping if:

* it was started with ttcn3-tcpdump-start.sh (despite the name it will
start dumpcap instead of tcpdump if dumpcap was found), where it gets
started without sudo, and

* no rule is set in the user's sudoers file to run kill as root with
NOPASSWD.

Change-Id: Ia63c37b54fb42a8c64a676334cef6f9df4152e18
---
A _scripts/tcpdump-dumpcap.inc.sh
M ttcn3-dumpcap-start.sh
M ttcn3-dumpcap-stop.sh
M ttcn3-tcpdump-start.sh
M ttcn3-tcpdump-stop.sh
5 files changed, 23 insertions(+), 43 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/64/40164/2

To view, visit change 40164. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia63c37b54fb42a8c64a676334cef6f9df4152e18
Gerrit-Change-Number: 40164
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder