Last change
on this file since 178 was
171,
checked in by rock, 14 years ago
|
Add: DRBL patch for Xen
|
-
Property svn:executable set to
*
|
File size:
1.4 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 | # [PATH] |
---|
12 | Work_Home="/opt/drbl-virt" |
---|
13 | Work_Path="/opt/drbl-virt/sbin" |
---|
14 | Now_Path="$(dirname $0)" |
---|
15 | PATH=${PATH}:$Work_Path |
---|
16 | |
---|
17 | # [Source] |
---|
18 | source $Now_Path/sbin/functions_drbl_virt |
---|
19 | # [Main] |
---|
20 | check_systemInfo |
---|
21 | checkroot |
---|
22 | |
---|
23 | case $Linux_Distribution in |
---|
24 | # for Ubuntu |
---|
25 | "Ubuntu") |
---|
26 | echo "Only support Debain" |
---|
27 | ;; |
---|
28 | # for Debian |
---|
29 | "Debian") |
---|
30 | # check bit |
---|
31 | echo $Linux_bit | grep 64 |
---|
32 | if [ $? == 0 ]; then |
---|
33 | Linux_bit="amd64" |
---|
34 | else |
---|
35 | Linux_bit="686" |
---|
36 | fi |
---|
37 | |
---|
38 | # check version |
---|
39 | echo $Linux_Version | grep "^5" |
---|
40 | if [ $? == 0 ]; then |
---|
41 | hypervisior=check_hypervisior |
---|
42 | if [ $hypervisior == "Xen" ]; then |
---|
43 | aptitude remove xen-linux-system-2.6.26-2-xen-${Linux_bit} xen-tools |
---|
44 | else |
---|
45 | aptitude remove kvm |
---|
46 | fi |
---|
47 | fi |
---|
48 | ;; |
---|
49 | # for Fedora |
---|
50 | "Fedora") |
---|
51 | echo "Only support Debain" |
---|
52 | ;; |
---|
53 | *) |
---|
54 | echo "Only support Debain" |
---|
55 | ;; |
---|
56 | esac |
---|
57 | |
---|
58 | cd |
---|
59 | rm -fr $Work_Home |
---|
Note: See
TracBrowser
for help on using the repository browser.