fix calling of the screen binary

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-05-14 13:55:29 -05:00
commit f2ce4dc789

View file

@ -25,10 +25,11 @@
# and friends can pick it up before going into screen
[ -x /bin/bash ] && /bin/true | /bin/bash -i -s
arg="-xRR"
out=`screen -ls 2>/dev/null` || true
if echo "$out" | grep -qsi "^No Sockets found in "; then
# Start new session
arg=""
exec screen
else
# Re-attach to an existing session
exec screen -xRR
fi
exec screen "$arg"