home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
vxvm
/
root.2
/
usr
/
sbin
/
vxinstall
/
vxinstall~
Wrap
Text File
|
1998-08-19
|
5KB
|
168 lines
#!/usr/bin/sh --
# Copyright (c) 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.
# @(#)cmd.vxvm:unixware/voladm/vxinstall.sh 1.3 10/9/97 13:06:33 - cmd.vxvm:unixware/voladm/vxinstall.sh
#ident "@(#)cmd.vxvm:unixware/voladm/vxinstall.sh 1.3"
# Copyright(C)1996 VERITAS Software Corporation. ALL RIGHTS RESERVED.
# UNPUBLISHED -- RIGHTS RESERVED UNDER THE COPYRIGHT
# LAWS OF THE UNITED STATES. USE OF A COPYRIGHT NOTICE
# IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
# OR DISCLOSURE.
#
# THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND
# TRADE SECRETS OF VERITAS SOFTWARE. USE, DISCLOSURE,
# OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR
# EXPRESS WRITTEN PERMISSION OF VERITAS SOFTWARE.
#
# RESTRICTED RIGHTS LEGEND
# USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT IS
# SUBJECT TO RESTRICTIONS AS SET FORTH IN SUBPARAGRAPH
# (C) (1) (ii) OF THE RIGHTS IN TECHNICAL DATA AND
# COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013.
# VERITAS SOFTWARE
# 1600 PLYMOUTH STREET, MOUNTAIN VIEW, CA 94043
if [ ! -c /dev/vx/iod -o ! -c /dev/vx/config ]
then
echo 'The vxvm device nodes have not been created yet.
It appears that you have just installed the vxvm package
and have not yet rebooted the new kernel.
Please reboot the system and run vxinstall afterwards.
Hit RETURN to continue .....' > /dev/tty
read x < /dev/tty
exit 1
fi
: ${VOLROOT_DIR:=$__VXVM_ROOT_DIR}
. ${VOL_SCRIPTS_LIB:-$VOLROOT_DIR/usr/lib/vxvm/lib}/vxcommon
VOLADM_CURRENT_MENU=
export VOLADM_CURRENT_MENU
rm -rf $RDIR/disks $RDIR/disk.d
check_exclude_files
if [ $? -ne 0 ]
then
ewritemsg -M vxvmshm:306 \
"Please correct the problem listed above before re-running vxinstall."
quit 0
fi
#
# If vxserial can't be found, is not executable, or is zero length
# assume that the package has been created without licensing.
#
vxserial=`type vxserial | awk '{ print $3 }'`
storage_array=
if ls -l /dev/dsk/c*s2 2> /dev/null | grep '/SUNW,pln@' > /dev/null
then
storage_array=yes
fi
if [ "$vxserial" != "found" -a -x "$vxserial" -a -s "$vxserial" -a \
"$storage_array" != "yes" ]
then
ewritemsg "\
VxVM uses license keys to control access. If you have a SPARCstorage
Array controller attached to your system, then VxVM will grant you a
limited use license automatically. The SSA license grants you
unrestricted use of disks attached to an SSA controller, but disallows
striping and RAID-5 on non-SSA disks. If you are not running a
SPARCstorage Array controller, then you must obtain a license key to
operate."
voladm_help_push yorn.help
echo "\nLicensing information:"
echo " System host ID: `hostid`"
echo " Host type: `prtconf | sed -n -e '/^$/{' -e n -e p -e q -e '}'`"
def=y
ask="Are you prepared to enter a license key"
echo " SPARCstorage Array: No array found (license is required)"
ls $VOL_CONFIG_DIR/elm/9[0-9] 2> /dev/null | grep . > /dev/null && {
def=n
ask="Do you wish to enter another license key"
voladm_yorn \
"Some licenses are already installed. Do you wish to review them" \
y && vxserial -p
}
while true
do
voladm_yorn "$ask" $def || {
[ "X$def" = Xy ] && {
ewritemsg "Cannot continue installation."
exit 1
}
break
}
vxserial -c || continue
ask="Do you wish to enter another license key"
def=n
done
echo
fi
voladm_menu_push VolumeManager
doit "$VOLADM_BIN/inst.top" $v_opt
ret=$?
if [ $ret = 0 -a -f $pcapfile ]; then
ewritemsg -M vxvmshm:458 \
"The system now must be shut down and rebooted in order to continue
the reconfiguration."
voladm_help_push inst.shut.help
voladm_yorn -M vxvmshm:368 "Shutdown and reboot now" n
if [ $? -ne 0 ]
then
ewritemsg -M vxvmshm:312 \
"Please shutdown before you perform any additional Volume Manager
or disk reconfiguration. To shutdown your system cd to / and type
shutdown -g0 -y -i6"
echo ""
quit 0
else
cd /
doit shutdown -g0 -y -i6
quit 0
fi
fi
if [ $ret = 0 ] ; then
doit "/etc/init.d/vxvm-reconfig"
echo ""
ewritemsg -M vxvmshm:458 \
"The system now must be shut down and rebooted in order to continue
the reconfiguration."
voladm_help_push inst.shut.help
voladm_yorn -M vxvmshm:368 "Shutdown and reboot now" n
if [ $? -ne 0 ]
then
ewritemsg -M vxvmshm:312 \
"Please shutdown before you perform any additional Volume Manager
or disk reconfiguration. To shutdown your system cd to / and type
shutdown -g0 -y -i6"
echo ""
quit 0
else
cd /
doit shutdown -g0 -y -i6
quit 0
fi
fi
quit $ret