Do something like:
set erg [catch { exec /opt/IDXcustom/bin/getvmhost.sh $uname } IpAddress ]
if $erg {
send_error "Error running"
exit $exitCode(ErrCommandExecutionFailed)
}
if {[string length $IpAddress] > 0} { set
env(TTA_HOSTNAME) $IpAddress }
regards
TAB
Trevor Dell schrieb:
I implemented a Sun Ray VDI environment, will be eventually ~250 user.
Now it's time to install SGD so they can completely get rid of Citrix
(horray!). I store the user/token/IP mapping in the old SDS (LDAP)
server that the Sun Ray server software comes with. I want to make SGD
use their AD for authentication, and I want to connect to the IP of
the VM based on the windows login name.
I used the script from the Sun VDA Kit as to start
with(vda-wcpwts.exp). I deleted the lines the VDA kit added to it, so
I assume it's like the original wcpwts.exp script (which I didn't know
existed). I can't use the rest of the components from the VDA Kit,
being that it's completely unsupported. Anyway, I added to the script:
set IpAddress [exec /opt/IDXcustom/bin/getvmhost.sh]
if {[string length $IpAddress] > 0} {
set env(TTA_HOSTNAME) $IpAddress
}
The getvmhost.sh does the ldapsearch command to connect to the LDAP
server and grab the proper IP to connect to. What I need is to pass
the username to that script so I can do the lookup.
I noticed the line 'set uname $username', so was actually about to try:
[exec /opt/IDXcustom/bin/getvmhost.sh $uname]
I would like to put in a little error handling too. Can I do some
tests, and on a failure just do:
send_error "Error message"
exit $exitCode(ErrCommandExecutionFailed)
And the user will see that message?
Still would like some documentation if there is any. My tickle is
pretty rusty to top it off. I noticed the username and password are
passed as arguments to the script, and it calls 'ttatsc' which I
assume is the glue to the RDP client. Any other SGD components to know
about?
- Trev
Tillmann Basien wrote:
What do you want to achieve? Possibly I can give you some tips.
The TTA .exp interface is a 7.x TCL with expect. So the scripts have
to be TCL. I you want to use other thinks like sh, you must do an
exec. Befor this you need to determine the DISPLAY and COOKIE.
The best source is unix..exp and wcpwts.exp.
TAB
_______________________________________________
SGD-Users mailing list
SGD-Users@filibeto.org
http://node1.filibeto.org/mailman/listinfo/sgd-users
--
*ToolBox Solution GmbH*
CEO/CTO Tillmann A. Basien
Balinger Straße 37A
D-70567 Stuttgart
Fon: +49 (0) 711 71 68 631
Hy : +49 (0) 173 87 38 987
Fax: +49 (0) 711 45 70 899
*** Sun Microsystems OEM Partner ***
mailto:[EMAIL PROTECTED] / http://www.tbsol.de <http://www.tbsol.de>HRB: 23711
This message and any files or documents attached are strictly
confidential or otherwise legally protected. It is intended only for the
individual or entity named. If you are not the named addressee or have
received this email in error, please inform the sender immediately,
delete it from your system and do not copy or disclose it or use it for
any purpose. Please also note that transmission cannot be guaranteed to
be secure or error-free.
_______________________________________________
SGD-Users mailing list
SGD-Users@filibeto.org
http://node1.filibeto.org/mailman/listinfo/sgd-users