Here is a small proc I wrote that switches sites. I’ve used successfully to run hcicmd commands to reload global tcl procs across multiple sites and run the hciprocstatus command. One caveat, remember that the msiutil tcl commands will not work for multiple sites inside a single tcl program because there is no unattach command.
Code:
#
# Procedure Name : shc_switchSite
# Description : Sets the tcl interpreters global environment to a particular site
# so that both internal and external hci commands will work properly.
# Also, ensures that all global variables in tcl and env represent
# the selected site.
# Input : siteName – The site you wish to switch to
# Return Value : 1 if the environment was successfully switched to the new site
# 0 if the switch was unsuccessful. This is usually caused by the
# site not existing
#
proc shc_switchSite { siteName } {
global env
set bolSiteSwitched 0
if { ! [catch {eval [exec ${::env(HCIROOT)}/sbin/hcisetenv -site tcl $siteName]} ] } {
setHciDirs
set bolSiteSwitched 1
}
return $bolSiteSwitched
}
John Mercogliano
Sentara Healthcare
Hampton Roads, VA
Author
Replies
Viewing 0 reply threads
The forum ‘Cloverleaf’ is closed to new topics and replies.