#!/bin/sh #set -x umask 022 PATH=/sbin:/usr/sbin:/bin:$PATH export PATH # Environment variables # --- SRV="g1o0007" D_PATH="/jumpstart/sol-refresh/rc_scripts" LIST=" S99-00-zfs S99-01-proto S99-02-oracle-svcs.sol_10_u11 " # Errors handling # --- fin_err() { echo echo "\v\t Error: $*" echo "\v\t Press any key to reboot n single-user mode ... " read x reboot -- -s } # Main # --- echo echo " finish_script: start" echo " finish_script: mount source data ... \c" [ -d /a/mnt ] || mkdir /a/mnt mount ${SRV}:${D_PATH} /a/mnt || { fin_err "Can't mount data source!" } echo "OK" echo " finish_script: copy custom scripts ... \t\c" for script in ${LIST} do cp -rp /a/mnt/${script} /a/etc/rc3.d/${script} 2>/tmp/err || \ fin_err "`cat /tmp/err`" chmod 744 /a/etc/rc3.d/${script} done umount /a/mnt || fin_err "Can't un-mount /a/mnt" echo "OK" # ------------------- Veritas install ---------------------------- echo "Installing Veritas SF 6.0.1 ... \t\c" #PATH=$PATH:/sbin:/usr/sbin #export PATH BUILDSRC="16.106.64.56:/export/mvs/software/veritas/sparc/6.0.1/dvd1-sol_sparc/sol10_sparc" # # Notice: # * You do not have to change the following scripts # ROOT=/a BUILDDIR="${ROOT}/build" PKGDIR="${BUILDDIR}/pkgs" echo "Creating directories" mkdir -p ${BUILDDIR} || fin_err "Can't create ${BUILDDIR}" mkdir -p ${PKGDIR} || fin_err "Can't create ${PKGDIR}" echo "Mounting ${BUILDSRC}" mount -F nfs -o vers=3 ${BUILDSRC} ${BUILDDIR} || fin_err "Can't mount ${BUILDSRC}" for PKG in VRTSperl VRTSvlic VRTSsfcpi601 VRTSspt VRTSvxvm VRTSaslapm VRTSob VRTSsfmh VRTSvxfs VRTSfsadv VRTSfssdk VRTSdbed VRTSodm do if [ -n "$PKG" ] then RESP="${PKGDIR}/${PKG}.response" echo "Installing package -- $PKG" if [ -f ${RESP} ] then pkgadd -n -a ${PKGDIR}/admin -d ${PKGDIR}/${PKG}.pkg -r ${RESP} -R ${ROOT} ${PKG} else pkgadd -v -a ${PKGDIR}/admin -d ${PKGDIR}/${PKG}.pkg -R ${ROOT} ${PKG} fi fi done #for PATCH in "" #do # if [ -n "$PATCH" ] # then # patchadd -R ${ROOT} -M ${PATCHDIR} ${PATCH} # fi #done #CALLED_BY=JUMPSTART ${ROOT}/opt/VRTS/install/bin/UXRT601/add_install_scripts #touch ${ROOT}/noautoshutdown umount ${BUILDDIR} echo "Veritas 6.0.1 installed : OK" echo " finish_script: finish" echo exit 0