#!/bin/sh # # # This script installs SUNWBDsdm which can be used to setup mirroring # in conjunction with Solstice Disk Suite. # Harry Hoffman if [ "${JASS_STANDALONE}" = "1" ] ; then logNotice "This script will not be run due to potential to overwrite existing SDS configuration, if you are certain you want to run this the script can be found in /opt/SUNWjass/Packages/SUNBEsdm." else logMessage "Installing SUNBEsdm" SUNBEsdm_NAME="SUNBEsdm" SUNBEsdm_PKG_DIR="${JASS_ROOT_DIR}/${JASS_PACKAGE_DIR}" PKGRM_FILE_JASS="/opt/SUNWjass/Packages/noask_pkgrm" # Install SUNBEsdm package onto the client logMessage "Installing ${SUNBEsdm_NAME} from ${SUNBEsdm_PKG_DIR}" if [ -d ${SUNBEsdm_PKG_DIR}/${SUNBEsdm_NAME} ]; then add_pkg -d ${SUNBEsdm_PKG_DIR} ${SUNBEsdm_NAME} add_to_manifest X "pkgrm -n -a ${PKGRM_FILE_JASS} ${SUNBEsdm_NAME}" cat << EOF >> ${JASS_ROOT_DIR}/etc/rc3.d/S99zSDM #!/bin/sh # Run sdmsetup to mirror the disks /opt/SUNBEsdm/sdmsetup -b ${SI_ORIGDISK} -m ${SI_MIRRORDISK} sleep 5 # Now setup the mirrors ksh /sdmsetup.ksh # echo "#!/bin/sh" > /etc/rc3.d/S99ySDM echo "#" >> /etc/rc3.d/S99ySDM echo "ksh /sdmsetup-after-reboot.ksh" >> /etc/rc3.d/S99ySDM echo "rm -f /etc/rc3.d/S99ySDM" >> /etc/rc3.d/S99ySDM /sbin/init 6 rm -f \$0 EOF else logNotice "Could not find ${SUNBEsdm_NAME}" fi fi