Database Reference
In-Depth Information
%post
ORACLE_HOME=/u01/app/oracle/product/12.1.0.1/dbhome_1
ORACLE_OWNER=oracle
# make the software available
umount /mnt
mount -t nfs stagingServer:/m/oracle/linux/x64/ /mnt
if [ $? -ne 0 ]; then
echo "FATAL error trying to mount the binares from the staging server"
exit 1
fi
if [ ! -f /mnt/12.1.0.1/database/runInstaller ]; then
echo "FATAL: cannot find OUI in the install location"
exit 2
fi
# here we invoke the installer. Testing for FATAL output and won't
# proceed if there is.
su - $ORACLE_OWNER -c \
"/mnt/12.1.0.1/database/runInstaller -silent -responseFile /opt/oracle/db.rsp" \
2>&1 | grep FATAL
if [ $? -eq 0 ]; then
echo "FATAL error occured-installation NOT completed"
exit 3
fi
cnt=0
while ! test -e $ORACLE_HOME/root.sh
do
echo "waiting for the software installation to complete"
sleep 30
cnt=$(( $cnt + 1 ))
if [ $cnt -eq 30 ]; then
echo "FATAL: timout waiting for the creation of root.sh "
exit 4
fi
done
# run the root script.
$ORACLE_HOME/root.sh
%files
%defattr(-,oracle,oinstall)
%config /etc/oraInst.loc
%attr(0660, oracle, oinstall) /etc/oraInst.loc
%attr(0660, oracle, oinstall) /opt/oracle/db.rsp
%changelog
* Mon Sep 9 2013 Engineering <engineering@example.com>
- initial version
- needs more error checking and handling
Search WWH ::




Custom Search