Changeset 169 for nutchez-0.2/src


Ignore:
Timestamp:
Jun 9, 2010, 10:48:15 AM (14 years ago)
Author:
shunfa
Message:
  1. 修改print參數
  2. master及client安裝均已測試過, 目前尚無發現其他問題(ubuntu9.04@VirtualBox)
Location:
nutchez-0.2/src/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/test/client_install

    r167 r169  
    1414# 需要 master_install 設定的參數區
    1515# Master IP here
    16 Master_IP_Address=192.168.56.101
     16Master_IP_Address=input.your.master.ip_address
    1717# Master Hostname here
    18 Master_Hostname=shunfa-VBox1
     18Master_Hostname=input_your_master_hostname
    1919# 此檔自己用的參數區
    2020Linux_Distribution="";
    2121Linux_Version="";
    2222Nutchuser_Passwd="xxxxxxxxxx";
     23
     24###print function###
     25function debug_info () {
     26  if [ $? -eq 0 ]; then
     27    echo -e "\033[1;35;40m info - $1 \033[0m"
     28  fi
     29}
     30
     31function show_info () {
     32  if [ $? -eq 0 ]; then
     33    echo -e "\033[1;32;40m $1 \033[0m"
     34  fi
     35}
    2336
    2437# 參數詢問
  • nutchez-0.2/src/test/client_install_func.sh

    r167 r169  
    3838  debug_info "check systemInfo"
    3939  show_info "Your system information are:"
    40 Linux_Distribution=$(lsb_release -a 2> /dev/null | grep "Distributor ID:" | awk '{print $3}')
    41 Linux_Version=$(lsb_release -a 2> /dev/null | grep "Release" | awk '{print $2}')
     40  Linux_Distribution=$(lsb_release -a 2> /dev/null | grep "Distributor ID:" | awk '{print $3}')
     41  Linux_Version=$(lsb_release -a 2> /dev/null | grep "Release" | awk '{print $2}')
    4242  show_info "$Linux_Distribution , $Linux_Version"
    4343}
     
    225225    expect eof"
    226226    else
    227       echo "Create nutchuser and change password."
     227      show_info "Create nutchuser and change password."
    228228      useradd -m nutchuser -s /bin/bash
    229229      expect -c "spawn passwd nutchuser
  • nutchez-0.2/src/test/install_func.sh

    r166 r169  
    256256  show_info "mkdir nutchez_client_install"
    257257  show_info "cd nutchez_client_install"
    258   show_info "scp nutchuser@$Master_IP_Address:/home/nutchuser/nutchez/source/* ."
     258  show_info "scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/* ."
     259  show_info "sudo su"
    259260  show_info "./client_install"
    260261}
Note: See TracChangeset for help on using the changeset viewer.