Corrected include class ordering
[oracle_puppet.git] / modules / oracle / templates / wruninstaller_9.2.0.1-template.erb
blob9d1920bf8bee1b28c5c7806ea66f8e3c7a907590
1 #!/usr/bin/bash
4 echo " Running the oracle silent install ./runInstaller -silent -responseFile <%= responsefile_path %> ORACLE_HOME=\"<%= current_oracle_home %>\" ORACLE_HOME_NAME=\"<%= oracle_patch_version %>\" UNIX_GROUP_NAME=\"oinstall\" LOCATION_FOR_DISK2=\"<%= disk2_9201_path %>\" LOCATION_FOR_DISK3=\"<%= disk3_9201_path %>\" s_cfgtyperet=\"Software Only\" "
6 cd <%= disk1_9201_path %>
8 ./runInstaller -silent -responseFile <%= responsefile_path %> ORACLE_HOME="<%= current_oracle_home %>" ORACLE_HOME_NAME="<%= oracle_patch_version %>" UNIX_GROUP_NAME="oinstall" LOCATION_FOR_DISK2="<%= disk2_9201_path %>" LOCATION_FOR_DISK3="<%= disk3_9201_path %>" s_cfgtyperet="Software Only"
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 echo "Parsing log and sleeping $SLEEP..."
57 done
58 touch /var/opt/oracle/9.2.0.1_installed
59 echo "The installation of Oracle9i 9.2.0.1 Database was successful."
60 exit 0