If the device is behind NAT, $UTDEVROOT will not be available so you
would not be able to get to that path.
Alternatives to the method sent by P.S.M. which don't use UTDEVROOT are:
utdesktop -Lc | grep ${SUN_SUNRAY_TOKEN} | cut -f 1 -d " "
utwho -c | grep $USER | nawk '{split($5,TMP,"."); print TMP[2]}'
Brad
P.S.M. Swamiji wrote:
Marc Brünink
wrote:
Hi all,
I need some help with the following scenario:
We've two SunRays. One with a microphone attached and one without. Our
program should behave different depending which SunRay the user is
using. To be specific: The Sunray with the microphone attached should
be able to use some resource to place a call. The other Sunray
shouldn't be able to do that. However a user should be able to log into
both Sunrays with the same username and password. So I need a
possibility to distinct between these 2 Sunrays. I thought about using
utwho and extract the MAC.However it would be nicer if I can get the
MAC without a system(..) call? Any possiblility to get the MAC address
with C? Any other idea?
If you just use only pseudo tokens then you can get the MAC id by just
removing
the "pseudo." from the SUN_SUNRAY_TOKEN variable .
Also ls -l $UTDEVROOT displays the MAC id but needs to do some
scripting
(awk and cut ) to get the exact MAC id and this should work for any
type of
tokens.
Thanks
P.S.M.Swamiji
Note:These are my personal opinions , nothing to do with my employer
Thanks
Marc
_______________________________________________
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
--
|
Brad Lackey
Desktop Product Lead
US Software Practice
(720) 548-3339
[EMAIL PROTECTED]
|
|
_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users