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

Change-Id: Ibbf404b3db7d36db6a58b04051f2d671adadc92f
This commit is contained in:
Terje Mikal Mjelde 2018-03-09 09:14:03 +01:00 committed by Ray Milkey
parent 811bbaef85
commit fbaf05532f

View File

@ -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)