Last change
on this file since 172 was
171,
checked in by rock, 14 years ago
|
Add: DRBL patch for Xen
|
-
Property svn:executable set to
*
|
File size:
1.5 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 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 | else |
---|
53 | aptitude install kvm |
---|
54 | fi |
---|
55 | fi |
---|
56 | ;; |
---|
57 | # for Fedora |
---|
58 | "Fedora") |
---|
59 | echo "Only support Debain" |
---|
60 | ;; |
---|
61 | *) |
---|
62 | echo "Only support Debain" |
---|
63 | ;; |
---|
64 | esac |
---|
65 | |
---|
Note: See
TracBrowser
for help on using the repository browser.