#
# ident "@(#)postinstall.src	1.3 05/02/14 SMI"
#
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

BBROOT=$PKG_INSTALL_ROOT     
export BBROOT

. $BBROOT/etc/opt/SUNWbb/blackbox.rc

cp $BBROOT/etc/default/init $BBROOTPATH/etc/default/init

# if sunray sw is already installed, then finish up
#
if [ -d /opt/SUNWut ]; then
  $BBPATH/bin/bbinstfinish
fi 

# if this is a BB system auto install, then create
# the preset number of users
#
if [ -f $BBAUTOINSTALL ]; then
  # have to unset BBROOT to have bbmkuser behave correctly with chroot
  #
  BBROOT=""	
  /usr/sbin/chroot $PKG_INSTALL_ROOT /$BBCHR/bin/bbmkuser \
    -c $USERPREFIX $BASE $BBMAXUSER
else
  # this is just a webtop install (no system install)
  # start the name service cache daemon right away  
  #
  /etc/init.d/bbinit start
fi

