#!/bin/bash

. ./param_bash.ini

clear
START "Pre installation checks" "ikit_2_1"

echo -n "Please enter you email [$MAIL] : "
read ans
if [ "$ans" != "" ] ; then
	MAIL=$ans
fi
Update_params "MAIL" "${MAIL}"

echo "The pre installation checks report will be send to the email ${MAIL}"

csh -f precheck.csh > /dev/null
if [ "$?" = "0" ] ; then
        cat ./log/pre_checks_status_file.log >> $gen_log 2>&1
        cat ./log/pre_checks_status_file.log
	cat  ./log/pre_checks_status_file.log | $MAIL_UTIL -s "$MAIN_PRODUCT installation - pre installation checks" $MAIL
	DONE "" "ikit_2_1"
else
        cat ./log/pre_checks_status_file.log >> $gen_log 2>&1
        cat ./log/pre_checks_status_file.log
	cat  ./log/pre_checks_status_file.log | $MAIL_UTIL -s "$MAIN_PRODUCT installation - pre installation checks" $MAIL
        ERROR "The pre installation checks are failed" "ikit_2_1"
fi
