source: drbl-virt/install.sh @ 196

Last change on this file since 196 was 188, checked in by rock, 14 years ago

BugFix?:

  • Property svn:executable set to *
File size: 976 bytes
RevLine 
[162]1#!/bin/bash
2# Program:
3#   Install DRBL virt module
4# Author:
5#   Jazz, Rock {jazz, rock}@nchc.org.tw
6# Version:
7#    1.0
8# History:                                                                                         
9#   2010/08/03  Rock    First release (1.0)
10
11# [PATH]
12Work_Home="/opt/drbl-virt"
13Work_Path="/opt/drbl-virt/sbin"
[171]14Now_Path="$(dirname $0)"
[162]15PATH=${PATH}:$Work_Path
16
17# [Source]
[171]18source $Now_Path/sbin/functions_drbl_virt
[162]19
20# [Main]
21#
22check_root
23
[188]24jude="no"
25if [ -e $Work_Home ]; then
26    echo "This system already has drbl-virt."
27    read -p "Do you want to install, again (yes/no): " jude
28
29    if [ $jude == "yes" ]; then
30        rm -fr $Work_Home
31    else
32        echo "Exit"
33        exit
34    fi
35fi
36
[162]37mkdir -p $Work_Home
[185]38mkdir $Work_Home/etc
39mkdir $Work_Home/.tmp
[171]40cp -fr $Now_Path/sbin $Work_Home/
41cp -fr $Now_Path/conf $Work_Home/
42cp  -fr $Now_Path/uninstall.sh $Work_Home/
[188]43
44echo "drbl-virt install completion"
45echo "Please go to /opt/drbl-virt/ to check"
Note: See TracBrowser for help on using the repository browser.