That's some pretty bad a$$ coding right there *nod*.

At this point, the SunRays are only used as kiosks (no real "VDI" environment) 
so this will work fine for now.  I love the idea of the hot-desking but for the 
amount of machines we have and the type of server we would need to properly 
power those machines, it's way too much.

Thanks again for all the good ideas though, perhaps I'll switch to one of those 
for future proofing the code.


>>> Bob Doolittle <[email protected]> 08/14/10 3:51 PM >>>


:)

MYDISP=$(echo $DISPLAY | sed 's/.*:\([^.]*\).*/\1/')

or better yet (invoking zero processes is even better):
MYDISP=${DISPLAY#*:}
MYDISP=${MYDISP%.*}

MYMAC=$(sed -n 's/^TERMINAL_ID=[^.]*\.//p' 
/tmp/SUNWut/config/dispinfo/$MYDISP)

:)

-Bob

> William Yang
>
>   
>> -----Original Message-----
>> From: [email protected] [mailto:sunray-users-
>> [email protected]] On Behalf Of John Francis
>> Sent: Friday, August 13, 2010 10:52 PM
>> To: SunRay-Users mailing list
>> Subject: Re: [SunRay-Users] MAC Address
>>
>> On 14 August 2010 05:13, Brian Imbriani <[email protected]> wrote:
>>     
>>> So I've done some googling, and none of these issues really seem to work
>>> very well in CentOS5/SRSS4.2.
>>>
>>> I need to get the MAC address of the SunRay so that I can then get the
>>> "Location" of the sunray.
>>>
>>> (SideBar:  If there's a direct way of getting the "Location" and "Other"
>>> fields of the sun-ray, I'm all ears).
>>>
>>> Someone wrote this for me once:
>>>
>>> --------------
>>> SRMAC=`cd $theFlag $UTDEVROOT; pwd | sed 's/.*\(............\)/\1/'`
>>>       
>> You want "cd -P" if you're using Bash on CentOS.
>>
>>     
>>> THELOC=`/opt/SUNWut/sbin/utdesktop -l |grep $SRMAC | /usr/bin/awk
>>>       
>> '{print
>>     
>>> $2;}'`
>>> --------------
>>>
>>>       
>> I do:
>>
>> SRMAC=`cd -P $UTDEVROOT; pwd | sed 's/.*\(............\)/\1/'`
>>
>> in Bash and that seems to work fine.
>>
>> --
>> Kind regards,
>>
>> John Francis
>> _______________________________________________
>> 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
>   

_______________________________________________
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