Yet another alternative, which we've been using here, since we also use 
registered tokens: 
#MAC fetching based on code found here: 
http://blogs.sun.com/ThinkThin/category/CAM+(Kiosk) 
MYDISP=`echo $DISPLAY | cut -d: -f2 | cut -d. -f1` 
MYMAC=`grep TERMINAL /tmp/SUNWut/config/dispinfo/$MYDISP | cut -d. -f2` 


-- 
William Yang 
[email protected] 

----- Original Message ----- 
From: "Ceri Davies" <[email protected]> 
To: "SunRay-Users mailing list" <[email protected]> 
Sent: Friday, March 13, 2009 7:00:29 PM GMT -05:00 US/Canada Eastern 
Subject: Re: [SunRay-Users] Finding out which DTU or token I'm using 

On Fri, Mar 13, 2009 at 11:51:48PM +0100, Volker A. Brandt wrote: > > What is 
wrong with this? > > > > SRMAC=`cd -P $UTDEVROOT; pwd | sed 
's/.*\(............\)/\1/'` > > This will only work in ksh. Use this: > > 
SRMAC=`perl -e 'print((split/\//,readlink $ENV{DTDEVROOT}."/unit")[4],"\n");'` 
I was after something lightweight, not perl :) It works OK in /bin/sh anyway, 
good enough for me. Ceri -- That must be wonderful! I don't understand it at 
all. -- Moliere 
_______________________________________________ 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