Last change
on this file since 178 was
178,
checked in by rock, 14 years ago
|
Add: (1)client xend enabled (2)setup VM IP range
|
-
Property svn:executable set to
*
|
File size:
1.8 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # Program: |
---|
3 | # Remove DRBL virt module |
---|
4 | # Author: |
---|
5 | # Jazz, Rock {jazz, rock}@nchc.org.tw |
---|
6 | # Version: |
---|
7 | # 1.0 |
---|
8 | # History: |
---|
9 | # 2010/07/20 Rock First release (1.0) |
---|
10 | |
---|
11 | # [Source] |
---|
12 | source /opt/drbl-virt/conf/drbl-virt.conf |
---|
13 | source $Work_Path/functions_drbl_virt |
---|
14 | |
---|
15 | # [Main] |
---|
16 | check_systemInfo |
---|
17 | |
---|
18 | case $Linux_Distribution in |
---|
19 | # for Ubuntu |
---|
20 | "Ubuntu") |
---|
21 | echo "Only support Debain" |
---|
22 | ;; |
---|
23 | # for Debian |
---|
24 | "Debian") |
---|
25 | # check xen package |
---|
26 | check_debian_xen_pkg="" |
---|
27 | check_debian_xen |
---|
28 | echo $check_debian_xen_pkg |
---|
29 | |
---|
30 | if [ $check_debian_xen_pkg == "no" ]; then |
---|
31 | echo -e "Don'f find Xen package, please check APT sources.list" |
---|
32 | exit 0 |
---|
33 | fi |
---|
34 | |
---|
35 | # check bit |
---|
36 | echo $Linux_bit | grep 64 > /dev/null |
---|
37 | if [ $? == 0 ]; then |
---|
38 | Linux_bit="amd64" |
---|
39 | else |
---|
40 | Linux_bit="686" |
---|
41 | fi |
---|
42 | |
---|
43 | # check version |
---|
44 | echo $Linux_Version | grep "^5" > /dev/null |
---|
45 | if [ $? == 0 ]; then |
---|
46 | hypervisior="" |
---|
47 | check_hypervisior |
---|
48 | echo $hyprtvisior |
---|
49 | |
---|
50 | if [ $hypervisior == "Xen" ]; then |
---|
51 | aptitude install xen-linux-system-2.6.26-2-xen-${Linux_bit} xen-tools bridge-utils |
---|
52 | if [ $1 == "stop" ]; then |
---|
53 | update-rc.d xend remove |
---|
54 | update-rc.d xendomains remove |
---|
55 | elif [ $1 == "start" ]; then |
---|
56 | update-rc.d xend defaults |
---|
57 | update-rc.d xendomains defaults |
---|
58 | fi |
---|
59 | |
---|
60 | else |
---|
61 | aptitude install kvm |
---|
62 | fi |
---|
63 | |
---|
64 | fi |
---|
65 | ;; |
---|
66 | # for Fedora |
---|
67 | "Fedora") |
---|
68 | echo "Only support Debain" |
---|
69 | ;; |
---|
70 | *) |
---|
71 | echo "Only support Debain" |
---|
72 | ;; |
---|
73 | esac |
---|
74 | |
---|
Note: See
TracBrowser
for help on using the repository browser.