#!/bin/sh


# Example JumpStart finish script
#
# A JumpStart finish script can be used to install additional software,
# such as the Smart Array driver, during deployment.  Use of a finish
# script to accomplish this task may be useful in environments where
# it is not possible to use the JumpStart profile to do so.
#
# Adjust this script as necessary to match your environment.  For example,
# set the value of NFSPATH below to the appropriate NFS path, and add
# calls to pkgadd(1M), as shown below, to install your packages.
#




# NFS mount path for the directory containing the additional
# packages to be installed.
#
# For more information on preparing this directory on the server,
# see the example JumpStart preparation in the Deployment Guide.
#
NFSPATH=10.10.10.10:/jumpstart/pkg


# Some other settings
#
ALTROOT=/a
SPOOLMNT=/tmp/finish.$$.mnt
ADMIN=/tmp/finish.$$.admin


# Mount the package spool dir
#
mkdir -p ${SPOOLMNT}
mount -F nfs ${NFSPATH} ${SPOOLMNT}


# Create an admin(4) file that will allow for unattended
# package installation.
#
cat > ${ADMIN} <<EOFADMIN
mail=
instance=overwrite
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=ask
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=default
EOFADMIN


# Add additional packages
#
/usr/sbin/pkgadd -a ${ADMIN} -d ${SPOOLMNT} -R ${ALTROOT} CPQary3
/usr/sbin/pkgadd -a ${ADMIN} -d ${SPOOLMNT} -R ${ALTROOT} BRCMbnx


# Cleanup
#
rm ${ADMIN}
umount ${SPOOLMNT}
rmdir ${SPOOLMNT}

