arehbein has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30134 )
Change subject: WIP: ttcn3-dumpcap*.sh: Don't use lsof ......................................................................
WIP: ttcn3-dumpcap*.sh: Don't use lsof
`lsof` isn't available in the docker image, use /proc fs instead to get the shell type
Related: OS#5736
Change-Id: Ie34eaa778f78b9685dd601d5e9898829caf0c7ca --- M ttcn3-tcpdump-stop.sh 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified arehbein: Looks good to me, approved
diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh index a649fd0..c1ce29f 100755 --- a/ttcn3-tcpdump-stop.sh +++ b/ttcn3-tcpdump-stop.sh @@ -24,7 +24,8 @@ date
# -e only works/is required only in Bash; in dash/POSIX shells it isn't required and will be part of the output -if (lsof -p $$ | grep -q /usr/bin/bash); then +SHELL="$(cat /proc/$$/cmdline | tr -d '\0')" +if [ "$SHELL" = "bash" ]; then ESCAPE_OPT="-e" else ESCAPE_OPT=""