Changeset 188 for nutchez-0.2/src/test


Ignore:
Timestamp:
Jun 14, 2010, 6:04:14 PM (14 years ago)
Author:
rock
Message:

新增語言檔 (client_install)

Location:
nutchez-0.2/src/test
Files:
1 added
2 edited

Legend:

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

    r169 r188  
    3535}
    3636
     37# Language Choice
     38choose_lang
     39
    3740# 參數詢問
    3841yesno="no"
    39 show_info "Your master IP: $Master_IP_Address"
    40 read -p "Is this data cooect? (yes/no): " yesno
     42show_info "$par_echo_1 $Master_IP_Address"
     43read -p "$par_echo_2" yesno
    4144             
    4245if [ "$yesno" == "yes" ] || [ "$yesno" == "y" ] ; then
    43     show_info "These parameters are correct."
     46    show_info "$par_echo_3"
    4447else
    45     show_info "Please edit these parameters in this file."
     48    show_info "$par_echo_4"
    4649    exit
    4750fi
    4851
    49 # 功能邏輯區
    50 
    51 
    52 # 程式邏輯區
    5352
    5453# 檢查執行這個程式的是否為root權限
     
    8281read
    8382
    84 
    8583# 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼
    8684creat_nutchuser_account
    8785read
    88 
    8986
    9087# scp nutchuser@master_ip:~ 把.ssh/目錄複製下來
     
    9390scp_master_nutchuser_sshkey $Master_IP_Address
    9491read
    95 
    9692
    9793# 用scp 複製 master 的設定與安裝資料
  • nutchez-0.2/src/test/client_install_func.sh

    r178 r188  
    2121
    2222
     23# choose Language
     24function choose_lang(){
     25
     26echo -e "\n$choose_lang_1"
     27read -p "$choose_lang_2 " langChoice
     28
     29if [ $langChoice == "2" ]; then
     30    source lang_zh_TW_client_install
     31else
     32    source lang_en_US_client_install
     33fi
     34}
     35
    2336# 檢查執行這個程式的是否為root權限
    2437function check_root(){
     
    2639  debug_info "check_root"
    2740  if [ $USER != "root" ]; then
    28     show_info "Please Change root to execute it!!!"
     41    show_info "$check_root_1"
    2942    exit
    3043  fi
    3144# 正式版後可拿掉此 echo
    32   show_info "Identify is root."
     45  show_info "$check_root_2"
    3346}
    3447
     
    3649# 查出此主機的作業系統,以及版本
    3750function check_systemInfo(){
    38   debug_info "check systemInfo"
    39   show_info "Your system information are:"
     51  debug_info "$check_sys_1"
     52  show_info "$check_sys_2"
    4053  Linux_Distribution=$(lsb_release -a 2> /dev/null | grep "Distributor ID:" | awk '{print $3}')
    4154  Linux_Version=$(lsb_release -a 2> /dev/null | grep "Release" | awk '{print $2}')
     
    4760function install_packages(){
    4861  # deb 系列系統
    49   debug_info "install_packages"
    50   debug_info "Check dependent packages"
     62  debug_info "$install_pack_1"
     63  debug_info "$install_pack_2"
    5164  if [ "$Linux_Distribution" == "Ubuntu" ] || [ "$Linux_Distribution" == "Debian" ] ;then
    52     echo -e "\nIt will install sime packages (expect, ssh, and dialog).\n"
     65    echo -e "\n$install_pack_if_1\n"
    5366    aptitude install -y expect ssh dialog
    5467  # rpm 系列系統
    5568  elif [ "$Linux_Distribution" == "Fedora" ] || [ "$Linux_Distribution" == "CentOS" ] ;then
    56     show_info "Please install expect, ssh, and dialog."
    57     exit
    58   else
    59     show_info "Please install expect, ssh, and dialog."
    60     exit
     69    show_info "$install_pack_if_2"
     70  else
     71    show_info "$install_pack_if_2"
    6172  fi
    6273}
Note: See TracChangeset for help on using the changeset viewer.