Jason Winningham wrote:

On Jun 13, 2007, at 4:37 PM, Craig Bender wrote:

If you use it from bourne

That's the catch - I'm using bash, and bash doesn't replace symlinks with the real path in the cwd. If I switch to sh, it works as advertised.

You could just parse the output of "ls -l SYMLINK",
which is a cheap operation (much cheaper than an LDAP
lookup).

While working my way through this, I started playing with the LDAP interface to the sun ray data store and got the information this way:

Now *that's* really digging into private interfaces that
are subject to change, and work only under certain
circumstances.

I presume in your case you are using registered desktops,
and logging in without smartcards? This wouldn't work
if you were using smartcards. And, if you didn't register
smartcards, it would be trivial because $SUN_SUNRAY_TOKEN
would just be pseudo.00144f85ec2d in this first example.

-Bob

Disclaimer: Opinions expressed in this mail are mine, not
necessarily my employer's.


mars:/home/staff/jdw $ echo $SUN_SUNRAY_TOKEN
user.1180629932-7053
mars:/home/staff/jdw $
mars:/home/staff/jdw $ ldapsearch -b utname=mars,o=v1,o=utdata -p 7012 "(utid=$SUN_SUNRAY_TOKEN)" utrawtokenids
version: 1
dn: utid=user.1180629932-7053,utname=logicalTokens,utname=mars,o=v1,o=utdata
utrawtokenids: pseudo.00144f85ec2d
mars:/home/staff/jdw $

At this point I have the MAC address. Assuming I have populated the location field in the data store, I can then:

mars:/home/staff/jdw $ ldapsearch -b utname=desktops,utname=mars,o=v1,o=utdata -p 7012 "(utid=00144f85ec2d)" utlocation
version: 1
dn: utid=00144f85ec2d,utname=desktops,utname=mars,o=v1,o=utdata
utlocation: eb237
mars:/home/staff/jdw $



Another way to get the MAC address is:

mars:/home/staff/jdw $ echo $DISPLAY
:10.0
mars:/home/staff/jdw $ cat /tmp/SUNWut/config/dispinfo/10
CURRENT_RESOLUTION=1280x1024:1280x1024
TERMINAL_ID=IEEE802.00144f85ec2d
MODEL_ID=SunRayP8
mars:/home/staff/jdw $


Thanks for the help.

-Jason
----------------------------------------
Jason Winningham
Computer Systems Engineer
College of Engineering
The University of Alabama in Huntsville
http://support.eng.uah.edu/ http://www.eng.uah.edu/~jdw


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

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

Reply via email to