#!/bin/ksh -p
# $Id: //depot/stable/explorer/tools/lic#2 $
#
# Explorer Version:
EXP_VERSION=4.0
#

# Source tools functions
. ${EXP_LIB}/exp_tools

# Run if specified to do so
script=${0##*/}
which_gate_exit license $script default all

get_cmd  "/etc/fw/bin/fw printlic" license/fw.printlic
get_cmd  "/usr/sbin/vxlicense -p"  license/vxlicense-p
get_cmd  "/usr/sbin/vxserial -p"   license/vxserial-p
get_cmd  "/usr/sbin/vxfsserial -p" license/vxfsserial-p
get_file /var/tmp/license_log      license/workshop.license_log

if [ -r /etc/rc2.d/S85lmgrd ]
then
    licdir=`egrep  -e licdir=  /etc/rc2.d/S85lmgrd | cut -f2 -d=`
    licfile=`egrep -e licfile= /etc/rc2.d/S85lmgrd | cut -f2 -d=`

    get_cmd "$licdir/lmstat -a -c $licdir/$licfile" license/lmstat
fi
