From fbaf05532f0d64b43e2bf960c77b7c6b8bbaea91 Mon Sep 17 00:00:00 2001 From: Terje Mikal Mjelde Date: Fri, 9 Mar 2018 09:14:03 +0100 Subject: [PATCH] [ONOS-7517] Makes the onos-mininet script compatible with newer versions of GNU Screen Change-Id: Ibbf404b3db7d36db6a58b04051f2d671adadc92f --- tools/test/bin/onos-mininet | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/test/bin/onos-mininet b/tools/test/bin/onos-mininet index 7f1d276faa..2683a2973e 100755 --- a/tools/test/bin/onos-mininet +++ b/tools/test/bin/onos-mininet @@ -11,7 +11,12 @@ export MAX_WAIT=${ONOS_MN_TIMEOUT:-90} cmd="$1" && shift log="screenlog.0" remote="$ONOS_USER@$OCN" -mininet="ssh -t -t $remote screen -L -S mininet" +screenversion=$(ssh $remote screen -v | sed -n -e 's/^Screen version \([0-9]*\.[0-9]*\).*$/\1/p') +# note: Screen version check for >4.04 may be inaccurate - The only sure thing is that v4.01 +# requires logname to NOT be given while in v4.05 it is optional (as long as -L is the +# last parameter on the command line). +[[ $screenversion > "4.04" ]] && screenlog=$log +mininet="ssh -t -t $remote screen -L $screenlog -S mininet" case $cmd in send)