Changeset 161 for drbl-virt


Ignore:
Timestamp:
Aug 2, 2010, 5:23:40 PM (14 years ago)
Author:
rock
Message:

Add: drbl_patch.sh drbl_virt_remove.sh conf/xend-config.sxp

Location:
drbl-virt
Files:
3 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/drbl_virt.sh

    r158 r161  
    99#   2010/07/20  Rock    First release (1.0)
    1010
     11# [PATH]
     12Work_Home="/opt/drbl-virt"
     13Work_Path="/opt/drbl-virt/sbin"
     14PATH=${PATH}:$Work_Path
     15
    1116# [Source]
    12 source drbl_virt_funs
     17source funs_drbl_virt
    1318
    1419# [Main]
     20install_drbl-virt_dir
    1521cpu_check
    1622check_systemInfo
    1723VMM_select
    1824
    19 # [Install VMM/Hypervisior]
     25# [Install VMM/Hypervisior] 1=Xen, 2=KVM
    2026if [ $VMM_select == 1 ]; then
    2127    source xen_intall.sh
  • drbl-virt/sbin/funs_drbl_virt

    r159 r161  
    1919function check_root(){     
    2020  if [ $USER != "root" ]; then
    21     echo "Please change user to root !!!"
    22     exit                   
     21    echo -e "Please input root password to run it!"
     22    su -c "$0" "$@"                   
     23
    2324  fi
    2425}
     
    4647       read -p "Which VMM/Hypervisior will be used in DRBL (1)Xen (2)KVM: " VMM_select
    4748    done
     49    echo "Xen" > $Work_Home/.tmp/hypervisior
    4850else
    4951    echo "Xen will be the only Hypervisior in your DRBL"
    5052    echo -e "Because CPU don't support virtualization, \nit can't choose KVM to be the Hypervisior"
    5153    VMM_select=2
     54    echo "KVM" > $Work_Home/.tmp/hypervisior
    5255fi 
    5356}   
    5457
     58# [create drbl-virt path]
     59function install_drbl-virt_dir(){
     60    mkdir -p $Work_Home/.tmp
     61}
     62
     63# [check Hypervisior]
     64function check_hypervisior(){
     65    return $(cat $Work_Home/.tmp/hypervisior)
     66}
     67
    5568# [DRBL Check]
    5669
Note: See TracChangeset for help on using the changeset viewer.