home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
scoadmin
/
root.2
/
etc
/
admpe.tlib
/
admpe
Wrap
Text File
|
1998-08-19
|
3KB
|
105 lines
# Copyright (c) 1992-1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
#
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
# SANTA CRUZ OPERATION INC.
#
# The copyright notice above does not evidence any actual or intended
# publication of such source code.
#******************************************************************************
#
# Copyright (C) 1992-1998 The Santa Cruz Operation, Inc.
# All Rights Reserved.
#
# The information in this file is provided for the exclusive use of
# the licensees of The Santa Cruz Operation, Inc. Such users have the
# right to use, modify, and incorporate this code into other products
# for purposes authorized by the license agreement provided they include
# this notice and the associated copyright notice with any such product.
# The information in this file is provided "AS IS" without warranty.
#
#===============================================================================
#@package: admpe CheckError GetDbInfo
proc CheckError cmd {
if { [ErrorCatch eStk 0 $cmd retVal] == 1 } {
ErrorOutput eStk
exit 1
} else {
return $retVal
}
}
proc GetDbInfo { version classDatabase installDirectory } {
upvar $classDatabase classDb
upvar $installDirectory installDir
set classDir {}
set installDir {}
if {$version != -1} {
set dbVersion $version
} else {
set dbVersion 1
}
if { [ catch "StanzaOpen /etc/default/scoAdmin STZ_RDONLY" sfp ] == 0} {
set cmd "StanzaGetVals $sfp defaultDbLocations scoAdminDirectory"
if { [ catch $cmd classDir ] != 0 } {
set classDir {}
}
if {$version == -1} {
set cmd "StanzaGetVals $sfp defaultDbLocations classDbVersion"
if { [ catch $cmd dbVersion ] != 0 } {
set dbVersion 1
}
}
set cmd "StanzaGetVals $sfp defaultDbLocations installRepository"
if { [ catch $cmd installDir ] != 0 } {
set installDir {}
}
CheckError "StanzaClose $sfp"
}
if {$classDir == {}} {
set classDir "/usr/lib/scoadmin/registry/osaConf"
}
if {$installDir == {}} {
set installDir "/usr/lib/scoadmin/registry/osaConf"
}
set classDb "$classDir/classes/classV$dbVersion.stz"
}
#@package: SCO_ADMINCK_MSGS SCO_ADMINCK_MSGS
proc SCO_ADMINCK_MSGS {} {}
global SCO_ADMINCK_MSGS
set SCO_ADMINCK_MSGS(@catalog@) {sysadm.cat@sa 13}
set SCO_ADMINCK_MSGS(ERR_OSANOREG) {1 {error: %s is not registered in the installed OSA database}}
set SCO_ADMINCK_MSGS(ERR_NOFILE) {2 {error: could not find file %s}}
set SCO_ADMINCK_MSGS(ERR_UNKNOWNVER) {3 {error: unknown class database version %s}}
#@package: SCO_CLASSCONF_MSGS SCO_CLASSCONF_MSGS
proc SCO_CLASSCONF_MSGS {} {}
global SCO_CLASSCONF_MSGS
set SCO_CLASSCONF_MSGS(@catalog@) {sysadm.cat@sa 11}
set SCO_CLASSCONF_MSGS(ERR_EXISTS) {1 {error: class or naming attribute exists}}
set SCO_CLASSCONF_MSGS(ERR_NOEXISTS) {2 {error: class not found}}
set SCO_CLASSCONF_MSGS(ERR_NONAMEEXISTS) {3 {error: naming attribute not found}}
#@package: SCO_OSACONF_MSGS SCO_OSACONF_MSGS
proc SCO_OSACONF_MSGS {} {}
global SCO_OSACONF_MSGS
set SCO_OSACONF_MSGS(@catalog@) {sysadm.cat@sa 12}
set SCO_OSACONF_MSGS(ERR_EXISTS) {1 {error: osa exists}}
set SCO_OSACONF_MSGS(ERR_NOEXISTS) {2 {error: osa not found}}