home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # @(#) request.shinc 13.2 98/01/07
- #
- # Copyright (c) 1997 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.
- #
- ME="`basename $0`"
- ISL_FILE="/etc/inst/scripts/postreboot.sh"
- SUCCESS=0; FAIL=1; INTR=3
- trap "exit $INTR" 2 3 15
- [ -f $ISL_FILE ] && exec 1>>/var/adm/log/$PKGINST.out
- [ -f $ISL_FILE ] && exec 2>>/var/adm/log/$PKGINST.err
-
- # location of the packaging information files during this phase of installation
- INSTALL_DIR="$REQDIR/$PKGINST"
-
- # menus check file
- RELEASECHECK_MSGS="releasecheck.msgs"
-
-
- # check usage
- if [ $# -ne 1 ]; then
- echo "Usage: $ME response_file" >&2
- exit $FAIL
- fi
- response_file="$1"
-
-
- #############################################################################
- #
- # main
- #
- #############################################################################
-
- # if not in initial system load then check OS release only
- if [ ! -f $ISL_FILE ]; then
-
- # determine the right location for menus - try /etc/inst/locale
- # first, and if no menus there then use ones in the installation
- # set - try for local ones first, then fall back on C
- LOCALE="${LC_ALL:-${LC_MESSAGES:-${LANG:-C}}}"
- MENU_DIR="/etc/inst/locale/$LOCALE/menus/$PKGINST"
- if [ ! -f $MENU_DIR/$RELEASECHECK_MSGS ]; then
- if [ ! -d $INSTALL_DIR/$LOCALE ]; then
- LOCALE="C"
- fi
- MENU_DIR=$INSTALL_DIR/$LOCALE
- fi
-
- # check the UnixWare release, and abort if it's one of the
- # incompatible ones
- if [ -f $INSTALL_DIR/releasecheck.sh ]; then
- # layered installation - interaction is OK
- sh $INSTALL_DIR/releasecheck.sh $MENU_DIR
- if [ $? -ne 0 ]; then
- exit $FAIL
- fi
- fi
-
- # make a note into the environment that the licensing has been checked
- # for this installation
- echo "REQUEST_CHECKED_LICENSING=\"TRUE\"" >$response_file
-
- else
-
- # in initial system load so defer license stuff to postinstall
- echo "REQUEST_CHECKED_LICENSING=\"FALSE\"" >$response_file
- fi
-
- # done
- exit $SUCCESS
-