home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #******************************************************************************
- #
- # Copyright (C) 1995 The Santa Cruz Operation, Inc.
- # All Rights Reserved.
- #
- # The information in this file is provided for the exclusive use of
- # the licensees of The Santa Cruz Operation, Inc. Such users have the
- # right to use, modify, and incorporate this code into other products
- # for purposes authorized by the license agreement provided they include
- # this notice and the associated copyright notice with any such product.
- # The information in this file is provided "AS IS" without warranty.
- #
- #===============================================================================
- buildDate="3.5.2 - Mon Jan 27 13:22:20 1997"
-
- # This script was built from shell library
- # $Id: install.shlib,v 10.16.2.3 1997/02/11 19:58:19 tobyd Exp $
-
- GLOB_VISION_FILE=/etc/vision.conf
- VISION_FILE=/etc/vision.conf
-
- hostname="`uname -n | sed 's@^\([^\.]*\).*@\1@'`"
-
- N=""
- C=""
- if echo -n | grep n > /dev/null
- then
- C="\c"
- else
- N="-n"
- fi
- _ss_headlines="--------------------------------------------------------------------------"
-
-
- REQDIR=/var/sadm/pkg/${PKGINST}/install
-
- # set up message catalogs
- . ${REQDIR}/${PKGINST}/setup
-
-
- OK=0
- FAIL=1
-
- ccsError()
- {
- echo "$0: " $* 1>&2
- }
-
- ccsWarning()
- {
- echo "$0: " $* 1>&2
- }
-
- if [ -f "$GLOB_VISION_FILE" ]
- then
- if [ -f $GLOB_VISION_FILE ]; then
- c_globdir=`grep "^VISION_DIR=" $GLOB_VISION_FILE | tail -1 | sed -e "/^VISION_DIR=/s///"`
- else
- c_globdir=""
- fi
-
- if [ -f $GLOB_VISION_FILE ]; then
- c_bindir=`grep "^VISION_BINDIR=" $GLOB_VISION_FILE | tail -1 | sed -e "/^VISION_BINDIR=/s///"`
- else
- c_bindir=""
- fi
-
- if [ -f $GLOB_VISION_FILE ]; then
- c_etcdir=`grep "^VISION_ETCDIR=" $GLOB_VISION_FILE | tail -1 | sed -e "/^VISION_ETCDIR=/s///"`
- else
- c_etcdir=""
- fi
-
- if [ -f $GLOB_VISION_FILE ]; then
- c_toolsdir=`grep "^VISION_TOOLSDIR=" $GLOB_VISION_FILE | tail -1 | sed -e "/^VISION_TOOLSDIR=/s///"`
- else
- c_toolsdir=""
- fi
-
- else
- ccsError "$lf_badglob"
- exit $FAIL
- fi
-
- # Attempt to stop VisionFS server
- if [ -n "$c_globdir" ]
- then
- if [ -f "${c_globdir}/bin/visionfs" -o -h "${c_globdir}/bin/visionfs" ]
- then
- ${c_globdir}/bin/visionfs stop
- if [ $? -ne 0 ]
- then
- ccsError "$l_failure"
- exit $FAIL
- fi
- fi
- else
- ccsError "$lf_badglob"
- exit $FAIL
- fi
-
-
- # Attempt to remove directories that weren't
- # created by the pkgadd.
-
- rm -rf $c_globdir/vfsdata
- rm -rf $c_globdir/vfsprofile
-
- # replace visionfs latebreaking scohelp file in BASEdoc pkg with original
-
- doc_file=NET_vfsN.latebreaking.html
- save_doc_file=${REQDIR}/${PKGINST}/${doc_file}.save
- old_doc_file=/usr/lib/scohelp/en_US.ISO8859-1/NET_vfs/$doc_file
-
- if [ -f "$save_doc_file" -a -f "$old_doc_file" ]
- then
- cp $save_doc_file $old_doc_file
- chown bin:bin $old_doc_file
- chmod 664 $old_doc_file
- removef BASEdoc $old_doc_file 1> /dev/null 2>&1
- removef -f BASEdoc
- installf BASEdoc $old_doc_file f 0664 bin bin
- installf -f BASEdoc
- fi
-
-
- exit $OK
-