gdmdynamic revision 16985
16985N/A#!/bin/ksh -p
16985N/A
16985N/Aoptype=""
16985N/Aoparg=""
16985N/A
16985N/Afor i in "$@"
16985N/Ado
16985N/A if [ ! "x$optype" = "x" ]; then
16985N/A oparg=$i
16985N/A break
16985N/A fi
16985N/A if [ "x$i" = "x-a" ]; then
16985N/A optype="add"
16985N/A continue
16985N/A fi
16985N/A if [ "x$i" = "x-d" ]; then
16985N/A optype="delete"
16985N/A continue
16985N/A fi
16985N/A if [ "x$i" = "x-l" ]; then
16985N/A optype="list"
16985N/A break
16985N/A fi
16985N/Adone
16985N/A
16985N/Acase $optype in
16985N/A add)
16985N/A# gdmdynamic -a 10=/usr/X11/bin/Xorg
16985N/A oparg=`echo $oparg | awk -F\= '{print $1}'`
16985N/A /usr/sbin/ck-seat-tool -a --display-type=Sunray display=:$oparg
16985N/A ;;
16985N/A delete)
16985N/A# gdmdynamic -d 10
16985N/A ssid=`/usr/bin/ck-list-sessions -f session-id,x11-display,display-type | grep Sunray | grep ":$oparg" | awk '{print $1}'`
16985N/A if [ ! "x$ssid" = "x" ]; then
16985N/A /usr/sbin/ck-seat-tool -d --session-id=$ssid
16985N/A fi
16985N/A ;;
16985N/A list)
16985N/A# gdmdynamic -l
16985N/A sessions=`/usr/bin/ck-list-sessions -f session-id,x11-display,display-type | grep Sunray | awk '{print $3}'`
16985N/A dyps=""
16985N/A for i in $sessions
16985N/A do
16985N/A if [ ! "x$i" = "x" ]; then
16985N/A dyps="$i;$dyps"
16985N/A fi
16985N/A done
16985N/A echo $dyps
16985N/A ;;
16985N/Aesac