#!/bin/bash
# Program:
#   DRBL virt module
# Author: 
#   Jazz, Rock {jazz, rock}@nchc.org.tw
# Version:
#    1.0
# History:                                                                                          
#   2010/07/20  Rock    First release (1.0) 

# [Source]
source /opt/drbl-virt/conf/drbl-virt.conf
source $Work_Path/functions_drbl_virt
# [Main]
check_root
cpu_check
check_systemInfo
VMM_select

# = 1.[Install VMM/Hypervisior] 1=Xen, 2=KVM =
if [ $VMM_select == 1 ]; then
    $Work_Path/xen_install.sh start
else
    $Work_Path/kvm_install.sh
fi

# = 2. Patch DRBL =                                                                                                                
$Work_Path/drbl_xen_patch.sh
 
# = 3. drbl_xen_repush.sh =
$Work_Path/drbl_xen_repush.sh

# = 4. Create User(drbl-virter) and mv drbl-virt.wat to tomcat =
creat_drbl-virter
install_tomcat_and_mv_drbl-virt
