Sunray 5 kiosk scripts
I found that in SRSS 4.2, $UTDEVROOT was not referenced properly. If you try to cd to $UTDEVROOT on any Sunray system, the 'unit' file referenced in the path is missing, and so you get a 'No such file or directory found' error. Weird.
The workaround for me is to access the DISPLAY variable and then grep the MAC address from there. The location field can then be extracted from the 'utdesktop' output as is usually the case.
# Sunray 4.1
theMACAddr=`cd $UTDEVROOT; /bin/pwd | sed 's/.*\(............\)/\1/'`
theLocation=`/opt/SUNWut/sbin/utdesktop -o | grep $theMACAddr | awk -F,
'{print $2;}'`
# Sunray 4.2
MYDISP=`echo $DISPLAY | awk -F: '{print $2}' | awk -F. '{print $1}'`
theMACAddr=`grep TERMINAL /tmp/SUNWut/config/dispinfo/$MYDISP | awk -F. '{print $2}'`
theLocation=`/opt/SUNWut/sbin/utdesktop -o | grep $theMACAddr | awk -F, '{print $2;}'`