After a couple hours of staring at truss output, I think I have this one solved.

I tracked the error message down to the /opt/SUNWut/lib/dtutsession script. There is a piece of code to find the token id based on the display number:

# If we know the display (only possible for a delete), derive the token
if [[ -z "$tid" && -n "$dpyparm" ]]
then
        tid=$(awk -F[=] '$1 == "TOKEN" {print $2}' ${DISPDIR}/${dpyparm})
        if [[ -z "$tid" ]]
        then
                # If we can't get the token from the display file, try
                # to get it from Xconfig
tid=$(sed -n "s/^Dtlogin\.\*_${dpyparm}\.environment:.*\<SUN_SUNRAY_TOKEN=\([^ ]*\).*/\1/p" $Xconfig)
        fi
        if [[ -z "$tid" ]]
        then
logIt error "Can't delete session for display ${dpyparm}: can't determine token."
                exit 2
        fi
fi




So I ran the awk command myself from the commandline:
r...@vm:/tmp# awk -F[=] '$1 == "TOKEN" {print $2}' /var/opt/SUNWut/displays/11
pseudo.00144fa7e27e

That seemed to work fine... so I looked at the truss output from the utsession -k -d 11 command and noticed this:

8234:   execve("/bin/awk", 0x00418AC8, 0x00418B18)  argc = 4
8234:    argv: awk -F[=] $1 == "TOKEN" {print $2}
8234:     /var/opt/SUNWut/displays/11

r...@vm:/tmp# which awk
/usr/gnu/bin/awk

So it looks like utdtsession is running a different awk then I was.
So I ran truss with the awk command:

r...@vm:/tmp# truss -f -a -e -rall -wall awk -F[=] '$1 == "TOKEN" {print $2}' /var/opt/SUNWut/displays/11
8322:   execve("/usr/bin/gawk", 0x08047CEC, 0x08047D00)  argc = 4
8322:    argv: awk -F[=] $1 == "TOKEN" {print $2}
8322:     /var/opt/SUNWut/displays/11


Just to make sure:
r...@vm:/tmp# /bin/awk -F[=] '$1 == "TOKEN" {print $2}' /var/opt/SUNWut/displays/11
r...@vm:/tmp#


Sure enough, /bin/awk doesn't function the same way as gawk.

I saw that the PATH was being set at the top of utdtsession:
PATH=/bin:/usr/bin:/usr/X11R6/bin

So I commented out that line and utsession -k works now.



Sorry for the long email, maybe this will help someone else. Or maybe I missed a step in configuring my SRSS box...


-Kevin
_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to