blob: 0d2777c129fcd39432c47ed0964217d7def7748d [file] [log] [blame]
Norman James422d4f32015-10-28 12:47:06 -05001#! /bin/sh
2
Norman Jamesc3e77c82015-11-17 19:35:01 -06003echo "Ctrl-a k to exit console"
Norman James269e9682015-11-17 08:59:26 -06004echo "A session log is created in current directory"
agangidi5336579c42016-03-03 01:27:48 -06005if screen -list | grep "hostconsole" | grep -q -i "Detached"; then
6 echo "You have an existing detached console session to host, you will be reconnected to that session"
7fi
8if screen -list | grep "hostconsole" | grep -q -i "Attached"; then
9 echo "You have an existing attached console session to host, you will be detached from that session and reconnected here instead"
10fi
Norman James269e9682015-11-17 08:59:26 -060011echo "[Enter] to continue"
Norman James422d4f32015-10-28 12:47:06 -050012read a
agangidi5336579c42016-03-03 01:27:48 -060013screen -dR hostconsole -U /dev/ttyS5