home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # @(#) preinstall.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"
-
-
- #############################################################################
- #
- # stop_admin()
- #
- # stops admin server
- #
- #############################################################################
- stop_admin()
- {
- if [ -x /usr/sbin/nsadmin ]; then
- /usr/sbin/nsadmin stop
- fi
- }
-
-
- #############################################################################
- #
- # main
- #
- #############################################################################
-
- # stop any running admin server
- stop_admin
-
- # if not done by request, then check OS version and complain if invalid
- if [ "$REQUEST_CHECKED_LICENSING" = "FALSE" \
- -o -z "$REQUEST_CHECKED_LICENSING" ]; 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
- # silent installation - interaction not OK
- sh $INSTALL_DIR/releasecheck.sh -q $MENU_DIR
- if [ $? -ne 0 ]; then
- exit $FAIL
- fi
- fi
- fi
-
- # done
- exit $SUCCESS
-