home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
base
/
install
/
request
< prev
Wrap
Text File
|
1998-08-19
|
3KB
|
135 lines
#ident "@(#)request 16.1 98/03/03"
#ident "$Header: $"
# Portions Copyright (C) 1990, 1991 Intel Corporation.
# Portions Copyright (C) 1990 Interactive Systems Corporation.
# All Rights Reserved
## request script for the base system
## need to add request info for lp, mouse,
## and any other stuff that was put into the base pkg.
trap 'exit 3' 15
# main ()
TAB=" "
POST_FILE=$1
#
# Make sure LOCALE environment variable is set. If it's not set
# coming in to this request script, then default to the C-locale.
#
LOCALE=${LC_ALL:-${LC_MESSAGES:-${LANG:-"C"}}}
MENU_DIR=/etc/inst/locale/${LOCALE}/menus/${PKG}
[ -d ${MENU_DIR} ] || mkdir -p ${MENU_DIR}
MENUS="chknode.1 warn.noboot"
for i in $MENUS
do
if [ ! -f ${MENU_DIR}/$i ]
then
if [ -f ${REQDIR}/inst/locale/${LOCALE}/${PKG}/$i ]
then
cp ${REQDIR}/inst/locale/${LOCALE}/${PKG}/$i ${MENU_DIR}
else
cp ${REQDIR}/${PKG}/$i ${MENU_DIR}
fi
fi
done
#
# Set up to use menu_colors; default to C-locale if ${LOCALE}'s dir has
# no menu_colors.sh
#
if [ -f /etc/inst/locale/${LOCALE}/menus/menu_colors.sh ]
then
. /etc/inst/locale/${LOCALE}/menus/menu_colors.sh
else
. /etc/inst/locale/C/menus/menu_colors.sh
fi
############### Begin UPGRADE AND OVERLAY #################
ETCINST=/etc/inst
UPINSTALL=$ETCINST/up
SBINPKGINST=/usr/sbin/pkginst
#
# I need to move my menus into pkg.base and set components
# If ${LOCALE} dirs not there, fall back to C-locale.
#
if [ -d /etc/inst/locale/${LOCALE}/menus/hd ]
then
UP_MENUS=/etc/inst/locale/${LOCALE}/menus/hd
else
UP_MENUS=/etc/inst/locale/C/menus/hd
fi
if [ -d /etc/inst/locale/${LOCALE}/menus/upgrade ]
then
UPGRADE_MENUS=/etc/inst/locale/${LOCALE}/menus/upgrade
else
UPGRADE_MENUS=/etc/inst/locale/C/menus/upgrade
fi
UPGRADE_STORE=/etc/inst/save.user
. $SBINPKGINST/updebug
[ "$UPDEBUG" = YES ] && set -x
#
# The only time this file will exist is if we're going through the install
# via the boot floppies. If the file does NOT exist, then we call
# chkpkgrel just like any other package.
#
if [ "$PKGINSTALL_TYPE" = "UPGRADE" -o "$PKGINSTALL_TYPE" = "UPGRADE2" \
-o "$PKGINSTALL_TYPE" = "OVERLAY" ]
then
# We need to do this because we're NOT calling chkpkgrel
[ "$PKGINSTALL_TYPE" = "OVERLAY" ] && {
echo 2 >$UPGRADE_STORE/base.env
# if it is overlay of an older SVR4.2, save the version
# of the old base package in $UPGRADE_STORE/base.ver
PKGINFO=/var/sadm/pkg/base/pkginfo
[ "$OVERLAY_TYPE" = OLD_VER -a -f $PKGINFO ] && {
V=`grep '^VERSION=' $PKGINFO | cut -d= -f2`
echo $V >$UPGRADE_STORE/base.ver
}
}
#
# If we're UPGRADE'ing, we have to come through here and we
# need to update CLASSES to install files required for upgrade.
#
[ "$PKGINSTALL_TYPE" = "UPGRADE" ] && {
CLASSES="$CLASSES upgrade up1"
echo "CLASSES=\"$CLASSES\"" >>$POST_FILE
}
[ "$PKGINSTALL_TYPE" = "UPGRADE2" ] && {
CLASSES="$CLASSES upgrade up2"
echo "CLASSES=\"$CLASSES\"" >>$POST_FILE
}
else
#
# For now, we're NOT going to allow an upgrade or overlay of the
# base system package without going through the boot floppies.
# This may change for future releases.
#
menu_colors warn
menu -f ${MENU_DIR}/warn.noboot -o /dev/null </dev/tty
exit 3
fi