Cross Reference: gdmdynamic
xref
: /
solaris-desktop
/
ext-sources
/
gdmdynamic
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
gdmdynamic revision 17291
16985
N/A
#!/
bin
/
ksh
-p
17291
N/A
AWK
=
"/
usr
/
gnu
/
bin
/
awk
"
17291
N/A
SED
=
"/
usr
/
gnu
/
bin
/
sed
"
17291
N/A
SEAT_TOOL
=
"/
usr
/
sbin
/
ck-seat-tool
"
17291
N/A
LIST_TOOL
=
"/
usr
/
bin
/
ck-list-sessions
"
16985
N/A
16985
N/A
optype
=
""
16985
N/A
oparg
=
""
16985
N/A
16985
N/A
for
i
in
"$@"
16985
N/A
do
16985
N/A
if
[ !
"x
$optype
"
=
"x"
];
then
16985
N/A
oparg
=$i
16985
N/A
break
16985
N/A
fi
16985
N/A
if
[
"x$i"
=
"x-a"
];
then
16985
N/A
optype
=
"add"
16985
N/A
continue
16985
N/A
fi
16985
N/A
if
[
"x$i"
=
"x-d"
];
then
16985
N/A
optype
=
"delete"
16985
N/A
continue
16985
N/A
fi
16985
N/A
if
[
"x$i"
=
"x-l"
];
then
16985
N/A
optype
=
"list"
16985
N/A
break
16985
N/A
fi
16985
N/A
done
16985
N/A
16985
N/A
case
$optype
in
16985
N/A
add
)
16985
N/A
# gdmdynamic -a 10=/
usr
/
X11
/
bin
/
Xorg
16985
N/A
oparg
=
`
echo
$oparg
|
awk
-F\=
'{print $1}'
`
17291
N/A
$SEAT_TOOL
-a --
display
-
type
=
Sunray
display
=:
$oparg
16985
N/A
;;
16985
N/A
delete
)
16985
N/A
# gdmdynamic -d 10
17291
N/A
ssid
=
`
$LIST_TOOL
-f
session
-
id
,
x11
-
display
,
display
-
type
|
grep
Sunray
|
$SED
-e s/\'//g |
$AWK
-v
disp
=:
$oparg
'{if ($2 == disp) print $1}'
`
16985
N/A
if
[ !
"x
$ssid
"
=
"x"
];
then
17291
N/A
$SEAT_TOOL
-d --
session
-
id
=
$ssid
16985
N/A
fi
16985
N/A
;;
16985
N/A
list
)
16985
N/A
# gdmdynamic -l
17291
N/A
sessions
=
`
$LIST_TOOL
-f
session
-
id
,
x11
-
display
,
display
-
type
|
grep
Sunray
|
$AWK
'{print $2}'
|
$SED
-e s/\'//g`
16985
N/A
dyps
=
""
16985
N/A
for
i
in
$sessions
16985
N/A
do
16985
N/A
if
[ !
"x$i"
=
"x"
];
then
16985
N/A
dyps
=
"$i;
$dyps
"
16985
N/A
fi
16985
N/A
done
16985
N/A
echo
$dyps
16985
N/A
;;
16985
N/A
esac