echo
if [ -e /etc/redhat-release ]
then 
  cd RHEL
  rpm -ivh Lib_Utils-1.00-08.noarch.rpm
  rpm -ivh CmdTool2-8.07.07-1.noarch.rpm

  chmod +x rhel-install.sh
  ./rhel-install.sh
    
else
  cd SLES
  rpm -ivh Lib_Utils-1.00-08.noarch.rpm
  rpm -ivh CmdTool2-8.07.07-1.noarch.rpm

   chmod +x sles-install.sh
  ./sles-install.sh
fi

# Compatible to 64bit system cmdtool - CmdTool264
if [ ! -f /opt/MegaRAID/CmdTool2/CmdTool2 -a -f /opt/MegaRAID/CmdTool2/CmdTool264 ]
then
	# CmdTool264 is here only, rename it to "CmdTool2"
	mv /opt/MegaRAID/CmdTool2/CmdTool264 /opt/MegaRAID/CmdTool2/CmdTool2
fi

export PATH=$PATH:/opt/MegaRAID/CmdTool2/
source /root/.bashrc
