Corrected include class ordering
[oracle_puppet.git] / modules / oracle / templates / wruninstaller_9.2.0.8_patchset-template.erb
blobbbe998645aa0646b5cc93091ce1f057d8a46f1fd
1 #!/usr/bin/bash
4 echo " Running the oracle silent install ./runInstaller -silent -ignoreSysPrereqs -responseFile <%= responsefile_patchset_path %> FROM_LOCATION="<%= products_patchset_path %>" ORACLE_HOME=\"<%= current_oracle_home %>\" ORACLE_HOME_NAME=\"<%= oracle_patch_version %>\" UNIX_GROUP_NAME=\"oinstall\" "
6 cd <%= disk1_9208_patchset_path %>
8 ./runInstaller -silent -ignoreSysPrereqs -responseFile <%= responsefile_patchset_path %> FROM_LOCATION="<%= products_patchset_path %>" ORACLE_HOME="<%= current_oracle_home %>" ORACLE_HOME_NAME="<%= oracle_patch_version %>" UNIX_GROUP_NAME="oinstall"
10 orainventory_path=<%= orainventory_path %>
11 oracle_install_log=`ls -lrt ${orainventory_path}/logs |grep oraInstall | grep out | tail -1 | awk '{print $9}'`
12 oracle_install_log_path="${orainventory_path}/logs/${oracle_install_log}"
14 function test_pad()
16 file=$1
18 sleep 120
19 grep 'was successful' $file
20 if [ $? -eq 1 ]; then return 0; fi
22 return 1
26 function reverse()
28 string=$1
29 len=$(echo -n $string | wc -c)
30 while test $len -gt 0
31 do
32 rev=$rev$(echo $string | cut -c $len)
33 len=$(( len - 1 ))
34 done
35 echo $rev
38 ANIM="//--\\||"
39 PAD=" "
40 SLEEP="0.1"
42 ANIM_L="$(reverse $ANIM)"
43 PAD_LN=${#PAD}
44 ANIM_LN=${#ANIM}
45 u=0; re=0; l=0
47 echo "Parsing log: ${oracle_install_log_path} for successful install message..."
48 while test_pad $oracle_install_log_path; do
49 if [ $re -eq 1 ]; then L=$ANIM_L; else L=$ANIM; fi
50 if [ $re -eq 1 ]; then p=$(( $PAD_LN - $u )); else p=$u; fi
51 echo -ne "${PAD:0:$p} ${L:$l:1} ${PAD:$p:$PAD_LN} \r"
52 if [ $u -eq $PAD_LN ]; then u=0; if [ $re -eq 1 ]; then re=0; else re=1; fi; fi
53 u=$(( u + 1 )); l=$(( l + 1 ))
54 if [ $l -eq $ANIM_LN ]; then l=0; fi
55 sleep $SLEEP
56 done
57 touch /var/opt/oracle/9.2.0.8_patchset_installed
58 echo "The installation of Oracle9i patchset 9.2.0.8 Database was successful."
59 exit 0