home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
chilidog.highland.cc.ks.us
/
chilidog.highland.cc.ks.us.zip
/
chilidog.highland.cc.ks.us
/
backup
/
bradford.20110328.home-admin.tar.gz
/
bradford.20110328.home-admin.tar
/
home
/
admin
/
.profile
< prev
next >
Wrap
Text File
|
2011-03-20
|
4KB
|
111 lines
#
# .profile - Mike Gadoury
#
# to set up environmental variables upon entry to ksh
#
# This is an AUTOMATICALLY INSTALLED file that comes with installations
# of Bradford's software. This file will get overwritten with every new
# install of Bradford's software. If there is a need to make a local
# modification to this environment, please create a file named
# /home/admin/.profile.local and add what you need to this file. Also,
# please make this file executable with "chmod +x".
#
# The following are all new env varibles that need to be set for BSC
# CVS is first
export EDITOR=/bin/vi
HISTSIZE=128
TTYNAME=`tty | sed 's/\/dev\///g'`
UNAME=$(which uname) # set architecture name (Sun4, ULTRIX, IRIS, etc.)
if [ -x "$UNAME" ]
then
ARCH=`$UNAME -s`
OSRELEASE=`$UNAME -r`
fi
if [ -e /etc/SuSE-release ]
then
DIST="`head -n 1 /etc/SuSE-release`"
fi
if [ -x "$(which lsb_release)" ]
then
DIST="$(lsb_release | awk '{print $2}')"
fi
export HOSTNAME=`$UNAME -n` # set the name of this machine
export DISPLAY=$HOSTNAME:0.0
. /bsc/campusMgr/bin/.yams
## Platform Specific Path
export PATH=.:/sbin:/usr/sbin:/root/bin:/usr/bin:/bin:/etc/init.d:/bsc/java/bin:/bsc/campusMgr/bin:/bsc/services/named/bin
export MANPATH=$MANPATH:/bsc/services/dhcpd/man:/bsc/services/named/man:/bsc/services/apache/man
stty erase "^?" kill "^U" intr "^C" eof "^D"
## CM Version
export CM_VERSION=`grep Ver /bsc/campusMgr/master_loader/.version | awk '{ print $6 }'`
export CM_DAY=`grep Ver /bsc/campusMgr/master_loader/.version | awk '{ print $8 }'`
export CM_DATE=`grep Ver /bsc/campusMgr/master_loader/.version | awk '{ print $9 }'`
cmtype=`$YAMS_DIST/bin/RunClient DumpKey | grep "Campus Manager Type" | awk '{print $5}'`
CM_TYPE_BRANDED="$cmtype"
CM_VENDOR=`$YAMS_DIST/bin/RunClient DumpKey | grep "Vendor" | awk '{print $3}'`
if [ "$cmtype" != "Unlicensed" ]
then
CM_PRODUCT_VENDOR="`grep "ProductName=" $YAMS_DIST/properties/$CM_VENDOR.properties | cut -d '=' -f2`"
CM_TYPE_BRANDED="`RunClient ApplianceInfo | grep "^Name" | sed s/Name\ //`"
CM_TYPE_BRANDED="${CM_PRODUCT_VENDOR} ${CM_TYPE_BRANDED}"
fi
function _yams_info
{
## CM Version
export CM_VERSION=`grep Ver /bsc/campusMgr/master_loader/.version | awk '{ print $6 }'`
export CM_DAY=`grep Ver /bsc/campusMgr/master_loader/.version | awk '{ print $8 }'`
export CM_DATE=`grep Ver /bsc/campusMgr/master_loader/.version | awk '{ print $9 }'`
cmtype=`$YAMS_DIST/bin/RunClient DumpKey | grep "Campus Manager Type" | awk '{print $5}'`
CM_VENDOR=`$YAMS_DIST/bin/RunClient DumpKey | grep "Vendor" | awk '{print $3}'`
if [ "$cmtype" != "Unlicensed" ]
then
CM_PRODUCT_VENDOR="`grep "ProductName=" $YAMS_DIST/properties/$CM_VENDOR.properties | cut -d '=' -f2`"
CM_TYPE_BRANDED="`RunClient ApplianceInfo | grep "^Name" | sed s/Name\ //`"
CM_TYPE_BRANDED="${CM_PRODUCT_VENDOR} ${CM_TYPE_BRANDED}"
fi
if [ "$cmtype" == "NetworkApplicationServer" ];
then
export CM_VERSION=`grep Ver /bsc/campusMgr/nessus_loader/.version | awk '{ print $6 }'`
export CM_DAY=`grep Ver /bsc/campusMgr/nessus_loader/.version | awk '{ print $8 }'`
export CM_DATE=`grep Ver /bsc/campusMgr/nessus_loader/.version | awk '{ print $9 }'`
fi
FW_DATE=$(awk 'BEGIN{ FS="\"";} /firmwareDate/ { print $4}' /bsc/.platform/version.conf)
FW_VERSION=$(awk 'BEGIN{ FS="\"";} /firmwareVersion/ { print $4}' /bsc/.platform/version.conf)
###########################
echo ""
echo "*************************************************************************"
echo " Appliance Type: "$CM_TYPE_BRANDED
echo " Engine Version: "$CM_VERSION
echo " Build Date: "$CM_DAY $CM_DATE
echo " Firmware Version: "$FW_VERSION
echo " Firmware Date: "$FW_DATE
echo "*************************************************************************"
echo ""
###########################
}
_yams_info
## Campus Manager Env.
. .bashrc
if [ -f /home/admin/.profile.local ] &&
[ -x /home/admin/.profile.local ] ; then
. /home/admin/.profile.local
fi