[ONOS-7517] Makes the onos-mininet script compatible with newer versions of GNU Screen

Change-Id: Ibbf404b3db7d36db6a58b04051f2d671adadc92f
diff --git a/tools/test/bin/onos-mininet b/tools/test/bin/onos-mininet
index 7f1d276..2683a29 100755
--- a/tools/test/bin/onos-mininet
+++ b/tools/test/bin/onos-mininet
@@ -11,7 +11,12 @@
 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)