Changeset 213 for nutchez-0.2/src/test


Ignore:
Timestamp:
Jun 21, 2010, 9:49:42 AM (14 years ago)
Author:
shunfa
Message:
  1. 修改master_install source 語言鏈結
  2. 修改移除時, 還原/etc/hosts至安裝NutchEZ前的版本
  3. 修改中文語言檔對應的變數
Location:
nutchez-0.2/src/test
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/test/client_install_func.sh

    r209 r213  
    282282  debug_info "$install_nutch_package_d1"
    283283  tar -zxvf /home/nutchuser/nutchez/source/NutchezForClientOf_$Master_IP_Address.tar.gz -C /opt/nutchez
     284  cp /etc/hosts /home/nutchuser/nutchez/system/hosts.bak
    284285  sed -i '1a '$Master_IP_Address' '$Master_Hostname'' /etc/hosts
    285286  #/opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode
  • nutchez-0.2/src/test/client_remove.sh

    r206 r213  
    3636  debug_info "check_root"
    3737  if [ $USER != "root" ]; then
    38     show_info "$check_root_1" # "請切換成 root 身份執行移除程式!!!"
     38    show_info "$CR_check_root_1" # "請切換成 root 身份執行移除程式!!!"
    3939    exit
    4040  fi
    41   show_info "$check_root_2" # "已確認為root身份, 將繼續執行此移除程式!"
     41  show_info "$CR_check_root_2" # "已確認為root身份, 將繼續執行此移除程式!"
    4242}
    4343
    4444# shutdown service
    4545function shutdown_service () {
    46   show_info "$shutdown_service_echo_1" # "關閉本機服務..."
     46  show_info "$CR_shutdown_service_echo_1" # "關閉本機服務..."
    4747  su nutchuser -c "/opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode"
    4848  su nutchuser -c "/opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"
    49   show_info "$shutdown_service_echo_2" # "本機服務已關閉"
     49  show_info "$CR_shutdown_service_echo_2" # "本機服務已關閉"
    5050}
    5151
    5252# 移除檔案及資料夾
    5353function remove_folders () {
    54   show_info "$remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."
     54  show_info "$CR_remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."
    5555  rm -rf /opt/nutchez
    5656  rm -rf /var/nutchez
    57   show_info "$remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除"
     57  show_info "$CR_remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除"
    5858}
    5959
     
    6161# 還原/etc/hosts
    6262function edit_hosts () {
    63   show_info "$edit_hosts_echo_1" # "修改/etc/hosts..."
    64   Line_NO=`cat /etc/hosts | grep -n $Master_IP_Address | sed 's/:.*//g'`
    65   if [[ $Line_NO -ge 1 ]]; then
    66     sed -i ''$Line_NO'd' /etc/hosts
    67   fi
    68   show_info "$edit_hosts_echo_2" # "完成修改/etc/hosts"
     63  show_info "$CR_edit_hosts_echo_1" # "修改/etc/hosts..."
     64#  Line_NO=`cat /etc/hosts | grep -n $Master_IP_Address | sed 's/:.*//g'`
     65#  if [[ $Line_NO -ge 1 ]]; then
     66#    sed -i ''$Line_NO'd' /etc/hosts
     67#  fi
     68  cat > /etc/hosts < /home/nutchuser/nutchez/system/hosts.bak
     69  show_info "$CR_edit_hosts_echo_2" # "完成修改/etc/hosts"
    6970}
    7071
     
    7273# 移除使用者
    7374function user_delete () {
    74   show_info "$user_delete_echo_1" # "正在刪除nutchuser使用者..."
     75  show_info "$CR_user_delete_echo_1" # "正在刪除nutchuser使用者..."
    7576  userdel -r nutchuser
    76   show_info "$user_delete_echo_2" # "使用者nutchuser已刪除"
     77  show_info "$CR_user_delete_echo_2" # "使用者nutchuser已刪除"
    7778}
    7879
    7980# Main function
    8081function main () {
    81   show_info "$main_echo_1" #"警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
    82   show_info "$main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"
     82  show_info "$CR_main_echo_1" #"警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
     83  show_info "$CR_main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"
    8384# 詢問是否繼續
    84   read -p "$main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消"
     85  read -p "$CR_main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消"
    8586# 確認移除
    8687  if [ $confirm -eq 1 ]; then
     
    9091    edit_hosts
    9192    user_delete
    92     show_info "$main_echo_4" # "移除程序已完成!"
     93    show_info "$CR_main_echo_4" # "移除程序已完成!"
    9394  elif [ $confirm -eq 2 ]; then
    94     show_info "$main_echo_5" # "您已取消移除程序!"
    95     show_info "$main_echo_6" # "若要移除請再重新執行!"
     95    show_info "$CR_main_echo_5" # "您已取消移除程序!"
     96    show_info "$CR_main_echo_6" # "若要移除請再重新執行!"
    9697  fi
    9798}
  • nutchez-0.2/src/test/install

    r206 r213  
    1414# Source functions
    1515source $Work_Path/install_func.sh
    16 source $Work_Path/install_lang.zh
     16source $Work_Path/lang_link
    1717### real code #####
    1818
     
    2828main () {
    2929  check_info
    30   show_info "$main_echo_1"
     30  show_info "$MI_main_echo_1"
    3131# show_info "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定密碼"
    3232  set_install_information
    3333  show_master_info
    34   read -p "$main_echo_2" confirm
     34  read -p "$MI_main_echo_2" confirm
    3535# read -p "Please confirm your install infomation: 1.Yes 2.No  " confirm
    3636  if [ $confirm -eq 1 ]; then
     
    3939    # 解壓縮
    4040    tar -zxvf nutchezV2-current.tar.gz -C /opt/
    41    
     41
     42    su nutchuser -c "mkdir /home/nutchuser/nutchez"
     43    su nutchuser -c "mkdir /home/nutchuser/nutchez/urls"
     44    su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt"
     45    su nutchuser -c "mkdir /home/nutchuser/nutchez/search"
     46    su nutchuser -c "mkdir /home/nutchuser/nutchez/source"
     47    su nutchuser -c "mkdir /home/nutchuser/nutchez/system"   
     48
    4249    Install_Nutch
    4350
     
    4552    chown -R nutchuser:nutchuser /opt/nutchez
    4653    chown -R nutchuser:nutchuser /var/nutchez
    47     su nutchuser -c "mkdir /home/nutchuser/nutchez"
    48     su nutchuser -c "mkdir /home/nutchuser/nutchez/urls"
    49     su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt"
    50     su nutchuser -c "mkdir /home/nutchuser/nutchez/search"
    51     su nutchuser -c "mkdir /home/nutchuser/nutchez/source"
    52     su nutchuser -c "mkdir /home/nutchuser/nutchez/system"
    5354
    5455    make_client_install
     
    5859    start_up_tomcat   
    5960    # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 
    60     show_info "$main_echo_3"
     61    show_info "$MI_main_echo_3"
    6162#   show_info "Install Successfully!!"
    62     show_info "$main_echo_4"
     63    show_info "$MI_main_echo_4"
    6364#   show_info "Visit http://$MasterIP_Address:8080"
    6465    client_install_commands
  • nutchez-0.2/src/test/install_func.sh

    r206 r213  
    11#!/bin/bash
    2 source $Work_Path/install_lang
     2source $Work_Path/lang_link
    33####### garbage here #############
    44function mainFunction ( )
     
    6565  debug_info "check_root"
    6666  if [ $USER != "root" ]; then
    67     show_info "$check_root_1"
     67    show_info "$MI_check_root_1"
    6868    exit
    6969  fi
    70   show_info "$check_root_2"
     70  show_info "$MI_check_root_2"
    7171}
    7272
    7373function check_systemInfo(){
    74   debug_info "$check_sys_1"
    75   show_info "$check_sys_2"
     74  debug_info "$MI_check_sys_1"
     75  show_info "$MI_check_sys_2"
    7676  Linux_Distribution=$(lsb_release -a 2> /dev/null | grep "Distributor ID:" | awk '{print $3}')
    7777  Linux_Version=$(lsb_release -a 2> /dev/null | grep "Release" | awk '{print $2}')
     
    8181function install_packages(){
    8282  # deb 系列系統
    83   debug_info "$install_pack_1"
    84   debug_info "$install_pack_2"
     83  debug_info "$MI_install_pack_1"
     84  debug_info "$MI_install_pack_2"
    8585  if [ "$Linux_Distribution" == "Ubuntu" ] || [ "$Linux_Distribution" == "Debian" ] ;then
    86     echo -e "\n$install_pack_if_1\n"
     86    echo -e "\n$MI_install_pack_if_1\n"
    8787    aptitude install -y expect ssh dialog
    8888  # rpm 系列系統
    8989  elif [ "$Linux_Distribution" == "Fedora" ] || [ "$Linux_Distribution" == "CentOS" ] ;then
    90     show_info "$install_pack_if_2"
    91   else
    92     show_info "$install_pack_if_2"
     90    show_info "$MI_install_pack_if_2"
     91  else
     92    show_info "$MI_install_pack_if_2"
    9393  fi
    9494}
    9595
    9696function check_nez_installed(){
    97   debug_info "$check_nez_1"
     97  debug_info "$MI_check_nez_1"
    9898  if [ -d "/opt/nutchez" ]; then
    99     show_info "$check_nez_2"
     99    show_info "$MI_check_nez_2"
    100100    exit
    101101  else
    102     show_info "$check_nez_3"
     102    show_info "$MI_check_nez_3"
    103103  fi
    104104}
    105105
    106106function check_sunJava(){
    107   debug_info "$check_sunJava_1"
    108   debug_info "$check_sunJava_2"
     107  debug_info "$MI_check_sunJava_1"
     108  debug_info "$MI_check_sunJava_2"
    109109
    110110  javaPath="/usr"
     
    118118
    119119  if [ "$JAVA_org" == "" ]; then
    120     show_info "$check_sunJava_if_1"
    121     show_info "$check_sunJava_if_2"
    122     show_info "$check_sunJava_if_3"
    123     read -p "$check_sunJava_if_4" choice
     120    show_info "$MI_check_sunJava_if_1"
     121    show_info "$MI_check_sunJava_if_2"
     122    show_info "$MI_check_sunJava_if_3"
     123    read -p "$MI_check_sunJava_if_4" choice
    124124    case $choice  in
    125125      "1")
    126         show_info "$check_sunJava_if_5"
     126        show_info "$MI_check_sunJava_if_5"
    127127        exit
    128128        ;;
    129129      "2")
    130         read -p "$check_sunJava_if_6" javaPath
     130        read -p "$MI_check_sunJava_if_6" javaPath
    131131        ;;
    132132        "*")
     
    141141
    142142          if [ "$JAVA_org" == "" ]; then
    143             show_info "$check_sunJava_if_7"
     143            show_info "$MI_check_sunJava_if_7"
    144144            exit
    145145            fi
     
    149149      large16=$(echo "$JAVA_version >= 1.6" | bc)
    150150      if [ "${large16}" == 0 ]; then
    151         show_info "$check_sunJava_if_8"
     151        show_info "$MI_check_sunJava_if_8"
    152152        exit
    153153      fi
    154154
    155       show_info "$check_sunJava_if_9"
    156   else
    157     show_info "$check_sunJava_if_10"
     155      show_info "$MI_check_sunJava_if_9"
     156  else
     157    show_info "$MI_check_sunJava_if_10"
    158158    exit
    159159  fi
     
    165165# 檢查是否有安裝openssh, openssh-server
    166166function check_ssh(){
    167   debug_info "$check_ssh_1"
     167  debug_info "$MI_check_ssh_1"
    168168  if [ -e /usr/bin/ssh ]; then
    169     show_info "$check_ssh_2"
    170   else
    171     show_info "$check_ssh_3"
     169    show_info "$MI_check_ssh_2"
     170  else
     171    show_info "$MI_check_ssh_3"
    172172    exit
    173173  fi
    174174
    175175  if [ -e /usr/sbin/sshd ]; then
    176     show_info "$check_ssh_4"
    177   else
    178     show_info "$check_ssh_5"
     176    show_info "$MI_check_ssh_4"
     177  else
     178    show_info "$MI_check_ssh_5"
    179179    exit
    180180  fi
     
    184184# 檢查是否有安裝dialog
    185185function check_dialog(){
    186   debug_info "$check_dialog_1"
     186  debug_info "$MI_check_dialog_1"
    187187  if [ -e /usr/bin/dialog ]; then
    188     show_info "$check_dialog_2"
    189   else
    190     show_info "$check_dialog_3"
     188    show_info "$MI_check_dialog_2"
     189  else
     190    show_info "$MI_check_dialog_3"
    191191    exit
    192192  fi
     
    210210
    211211function set_nutchuser_passwd () {
    212   read -sp "$set_nutchuser_passwd_echo_1" Nutchuser_Passwd
     212  read -sp "$MI_set_nutchuser_passwd_echo_1" Nutchuser_Passwd
    213213# read -sp "Please enter nutchuser's password :  " Nutchuser_Passwd
    214214  echo -e "\n"
    215   read -sp "$set_nutchuser_passwd_echo_2" Nutchuser_Passwd2
     215  read -sp "$MI_set_nutchuser_passwd_echo_2" Nutchuser_Passwd2
    216216# read -sp "Please enter nutchuser's password again:  " Nutchuser_Passwd2
    217217  echo -e "\n"
     
    273273  else
    274274    declare -i i=1
    275     show_info "$select_eth_echo_1"
     275    show_info "$MI_select_eth_echo_1"
    276276#   show_info  "\nSystem have multiple network device, which network use for this machine: "
    277277
     
    281281        i=i+1
    282282      done
    283       read -p "$select_eth_echo_2" net_choice
     283      read -p "$MI_select_eth_echo_2" net_choice
    284284#     read -p "Please choice(1/2/3...): " net_choice
    285285    if [ -z $net_choice ]; then
     
    287287    fi
    288288
    289     show_info "$select_eth_echo_3 $net_choice"
     289    show_info "$MI_select_eth_echo_3 $net_choice"
    290290#   show_info "Your choice is $net_choice"
    291291    net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice)
     
    294294    net_MacAddr=$(ifconfig $net_interface | grep 'HW' | sed 's/^.*HWaddr //g')
    295295
    296     show_info "$select_eth_echo_4 $net_address"
     296    show_info "$MI_select_eth_echo_4 $net_address"
    297297#   show_info "net_address is $net_address"
    298     show_info "$select_eth_echo_5 $net_MacAddr"
     298    show_info "$MI_select_eth_echo_5 $net_MacAddr"
    299299#   show_info "net_MacAddr is $net_MacAddr"
    300300  fi
     
    303303
    304304function show_master_info () {
    305   show_info "$show_master_info_echo_1 $MasterIP_Address"
    306   show_info "$show_master_info_echo_2 $net_MacAddr"
     305  show_info "$MI_show_master_info_echo_1 $MasterIP_Address"
     306  show_info "$MI_show_master_info_echo_2 $net_MacAddr"
    307307
    308308#  show_info "The Master IP Address is $MasterIP_Address"
     
    311311
    312312function make_ssh_key () {
    313   debug_info "$make_ssh_key_echo_1"
     313  debug_info "$MI_make_ssh_key_echo_1"
    314314# debug_info "Make ssh key(begin...)"
    315315  su nutchuser -c 'ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ""'
    316316  su nutchuser -c "cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys"
    317317  su nutchuser -c "ssh-add /home/nutchuser/.ssh/id_rsa"
    318   debug_info "$make_ssh_key_echo_2"
     318  debug_info "$MI_make_ssh_key_echo_2"
    319319# debug_info "Make ssh key(done!)"
    320320}
     
    322322
    323323function set_haoop-site () {
    324   debug_info "$set_haoop_site_echo_1"
     324  debug_info "$MI_set_haoop_site_echo_1"
    325325# debug_info "set hadoop-site.xml(begin...)"
    326326  cd $Nutch_HOME/conf/
     
    341341</configuration>
    342342EOF
    343   debug_info "$set_haoop_site_echo_2"
     343  debug_info "$MI_set_haoop_site_echo_2"
    344344# debug_info "set hadoop-site.xml(done!)"
    345345}
     
    347347# 修改nutch-site.xml中-http.agent.url, http.agent.email
    348348function set_nutch-site () {
    349   debug_info "$set_nutch_site_echo_1"
     349  debug_info "$MI_set_nutch_site_echo_1"
    350350# debug_info "set nutch-site.xml(begin...)"
    351351  Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.url' | sed 's/:.*//g'`
    352   debug_info "$set_nutch_site_echo_2"
     352  debug_info "$MI_set_nutch_site_echo_2"
    353353# debug_info "debug...http.agent.url line number = $Line_NO..."
    354354  sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml
    355   debug_info "$set_nutch_site_echo_3"
     355  debug_info "$MI_set_nutch_site_echo_3"
    356356# debug_info "debug...edit http.agent.url delete line $((Line_NO+1))..."
    357357  sed -i ''$Line_NO'a <value>'$MasterIP_Address'</value>' $Nutch_HOME/conf/nutch-site.xml
    358   debug_info "$set_nutch_site_echo_4"
     358  debug_info "$MI_set_nutch_site_echo_4"
    359359# debug_info "debug...edit http.agent.url done..."
    360360
    361361  Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.email' | sed 's/:.*//g'`
    362   debug_info "$set_nutch_site_echo_5"
     362  debug_info "$MI_set_nutch_site_echo_5"
    363363# debug_info "debug...http.agent.email line number = $Line_NO..."
    364364
    365365  sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml
    366   debug_info "$set_nutch_site_echo_6"
     366  debug_info "$MI_set_nutch_site_echo_6"
    367367# debug_info "debug...edit http.agent.email delete line $((Line_NO+1))..."
    368368  sed -i ''$Line_NO'a <value>'$Admin_email'</value>' $Nutch_HOME/conf/nutch-site.xml
    369   debug_info "$set_nutch_site_echo_7"
     369  debug_info "$MI_set_nutch_site_echo_7"
    370370# debug_info "debug...edit http.agent.email done..."
    371   debug_info "$set_nutch_site_echo_8"
     371  debug_info "$MI_set_nutch_site_echo_8"
    372372# debug_info "set nutch-site.xml(done!)"
    373373}
    374374
    375375function format_HDFS () {
    376   debug_info "$format_HDFS_echo_1"
     376  debug_info "$MI_format_HDFS_echo_1"
    377377  su nutchuser -c "$Nutch_HOME/bin/hadoop namenode -format"
    378   debug_info "$format_HDFS_echo_2"
     378  debug_info "$MI_format_HDFS_echo_2"
    379379}
    380380
    381381function start_up_NutchEZ (){
    382   debug_info "$start_up_NutchEZ_echo_1"
     382  debug_info "$MI_start_up_NutchEZ_echo_1"
    383383# debug_info "start up NutchEZ..."
    384384  su nutchuser -c "$Nutch_HOME/bin/start-all.sh"
     
    387387
    388388function set_hosts () {
    389   debug_info "$set_hosts_echo_1"
     389  debug_info "$MI_set_hosts_echo_1"
     390  cp /etc/hosts /home/nutchuser/nutchez/system/hosts.bak
    390391  Line_NO=`cat /etc/hosts | grep -n $(hostname) | sed 's/:.*//g'`
    391392  content=$(cat /etc/hosts | awk 'NR=='$Line_NO'{printf "# " ; print}' )
     
    395396
    396397function Install_Nutch () {
    397   debug_info "$install_Nutch_echo_1 $MasterIP_Address "
     398  debug_info "$MI_install_Nutch_echo_1 $MasterIP_Address "
    398399# debug_info "MasterIP_Address=$MasterIP_Address"
    399   debug_info "$install_Nutch_echo_2 $(hostname)"
     400  debug_info "$MI_install_Nutch_echo_2 $(hostname)"
    400401# debug_info "Master_Hostname=$(hostname)"
    401402  su nutchuser -c "echo $net_address $(hostname) $net_MacAddr \>\> ~/nutchez/system/nutch_nodes"
     
    409410  cd $Start_PATH
    410411  Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'`
    411   debug_info "$client_PassMasterIPAddr_echo_1"
     412  debug_info "$MI_client_PassMasterIPAddr_echo_1"
    412413# debug_info "debug...Master IP here line number = $Line_NO..."
    413414  sed -i ''$((Line_NO+1))'d' client_install
    414   debug_info "$client_PassMasterIPAddr_echo_2"
     415  debug_info "$MI_client_PassMasterIPAddr_echo_2"
    415416# debug_info "debug...edit Master IP at line $((Line_NO+1))..."
    416417  sed -i ''$Line_NO'a Master_IP_Address='$MasterIP_Address'' client_install
    417   debug_info "$client_PassMasterIPAddr_echo_3"
     418  debug_info "$MI_client_PassMasterIPAddr_echo_3"
    418419# debug_info "edit client_install done..."
    419420}
     
    423424  cd $Start_PATH
    424425  Line_NO=`cat client_install | grep -n '# Master Hostname here' | sed 's/:.*//g'`
    425   debug_info "$client_PassMaster_Hostname_echo_1"
     426  debug_info "$MI_client_PassMaster_Hostname_echo_1"
    426427# debug_info "debug...Master hostname here line number = $Line_NO..."
    427428  sed -i ''$((Line_NO+1))'d' client_install
    428   debug_info "$client_PassMaster_Hostname_echo_2"
     429  debug_info "$MI_client_PassMaster_Hostname_echo_2"
    429430# debug_info "debug...edit Master Hostname at line $((Line_NO+1))..."
    430431  sed -i ''$Line_NO'a Master_Hostname='$(hostname)'' client_install
    431   debug_info "$client_PassMaster_Hostname_echo_3"
     432  debug_info "$MI_client_PassMaster_Hostname_echo_3"
    432433# debug_info "edit client_install done..."
    433434}
     
    448449  # 打包安裝目錄(不含tomcat)
    449450 
    450   debug_info "$make_client_install_echo_1"
     451  debug_info "$MI_make_client_install_echo_1"
    451452# debug_info "function make_client_install..."
    452453
     
    460461  mv NutchezForClientOf_$MasterIP_Address.tar.gz /home/nutchuser/nutchez/source
    461462  cp $Start_PATH/client_install $Start_PATH/client_install_func.sh /home/nutchuser/nutchez/source
     463#  cp $Start_PATH/client_install $Start_PATH/client_install /home/nutchuser/nutchez/source
     464#  cp $Start_PATH/client_install $Start_PATH/client_remove.sh /home/nutchuser/nutchez/source
     465#  cp $Start_PATH/client_install $Start_PATH/lang* /home/nutchuser/nutchez/source
    462466}
    463467
    464468function start_up_tomcat () {
    465   debug_info "$start_up_tomcat_echo_1"
     469  debug_info "$MI_start_up_tomcat_echo_1"
    466470# debug_info "start up tomcat..."
    467471
    468472  i=10
    469   debug_info "$start_up_tomcat_echo_2"
     473  debug_info "$MI_start_up_tomcat_echo_2"
    470474  until [ $i -lt 1 ]
    471475    do
     
    474478    done
    475479  su nutchuser -c "$Tomcat_HOME/bin/startup.sh"
    476   debug_info "$start_up_tomcat_echo_3"
     480  debug_info "$MI_start_up_tomcat_echo_3"
    477481# debug_info "tomcat has been started..."
    478482}
     
    481485# client簡易步驟
    482486function client_install_commands () {
    483   show_info "$client_install_commands_echo_1"
    484   show_info "$client_install_commands_echo_2"
    485   show_info "$client_install_commands_echo_3"
    486   show_info "$client_install_commands_echo_4"
    487   show_info "$client_install_commands_echo_5"
    488   show_info "$client_install_commands_echo_6"
    489   show_info "$client_install_commands_echo_7"
    490 
     487  show_info "$MI_client_install_commands_echo_1"
     488  show_info "$MI_client_install_commands_echo_2"
     489  show_info "$MI_client_install_commands_echo_3"
     490  show_info "$MI_client_install_commands_echo_4"
     491  show_info "$MI_client_install_commands_echo_5"
     492  show_info "$MI_client_install_commands_echo_6"
     493  show_info "$MI_client_install_commands_echo_7"
    491494
    492495#  show_info "Client Install Command as Follows:"
  • nutchez-0.2/src/test/lang/lang_zh_TW

    r211 r213  
    1010
    1111############ Lang for master_install -Start ############
    12 main_echo_1="歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定>密碼"
    13 main_echo_2="請確認上述的安裝資訊:1.正確 2.不正確"
    14 main_echo_3="安裝成功!"
    15 main_echo_4="請進入管理頁面:http://$MasterIP_Address:8080"
     12MI_main_echo_1="歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定>密碼"
     13MI_main_echo_2="請確認上述的安裝資訊:1.正確 2.不正確"
     14MI_main_echo_3="安裝成功!"
     15MI_main_echo_4="請進入管理頁面:http://$MasterIP_Address:8080"
    1616
    1717## Lang for master_install_func.sh ##
    1818### [for choose_lang()] ###
    19 choose_lang_1="請選擇語言: (1)English (2)中文"
    20 choose_lang_2="(1/2):"
     19MI_choose_lang_1="請選擇語言: (1)English (2)中文"
     20MI_choose_lang_2="(1/2):"
    2121
    2222### [for check_root()]###
    23 check_root_1="請切換成 root 身份執行!!!"
    24 check_root_2="身份是 root"
     23MI_check_root_1="請切換成 root 身份執行!!!"
     24MI_check_root_2="身份是 root"
    2525 
    2626### [for check_systemInfo()]###
    27 check_sys_1="check_systemInfo"
    28 check_sys_2="作業系統為: "
     27MI_check_sys_1="check_systemInfo"
     28MI_check_sys_2="作業系統為: "
    2929 
    3030### [for install_packages()]###
    31 install_pack_1="install_packages"
    32 install_pack_2="檢查套件相依性"
    33 install_pack_if_1="將會安裝 expect, ssh 和 dialog 套件"
    34 install_pack_if_2="請手動安裝 expect, ssh 和 dialog 套件"
     31MI_install_pack_1="install_packages"
     32MI_install_pack_2="檢查套件相依性"
     33MI_install_pack_if_1="將會安裝 expect, ssh 和 dialog 套件"
     34MI_install_pack_if_2="請手動安裝 expect, ssh 和 dialog 套件"
    3535 
    3636### [for check_nez_installed()] ###
    37 check_nez_1="chcheck_nez_installed"
    38 check_nez_2="系統先前已安裝NutchEz"
    39 check_nez_3="系統尚未安裝 NutchEz"
     37MI_check_nez_1="chcheck_nez_installed"
     38MI_check_nez_2="系統先前已安裝NutchEz"
     39MI_check_nez_3="系統尚未安裝 NutchEz"
    4040 
    4141### [for check_sunJava()] ###
    42 check_sunJava_1="check_sunJava"
    43 check_sunJava_2="NutchEz 需要 Sun Java JDK 1.6 以上的版本"
    44 check_sunJava_if_1="Java 並不是 Sun 版本, 請自行安裝 Sun 版本的 Java"
    45 check_sunJava_if_2="請輸入您的選擇: "
    46 check_sunJava_if_3="(1)系統沒有 Sun Java (2)Sun Java已安裝並於其他路徑 (3)結束"
    47 check_sunJava_if_4="請選擇 (1/2/3): "
    48 check_sunJava_if_5="請自行安裝 Sun Java 1.6 以上版本"
    49 check_sunJava_if_6="請輸入 Sum Java 的家路徑 (例如: '/usr/lib/jvm/java-6-sun-1.6.0.12'): "
    50 check_sunJava_if_7="Java 並不是 Sun 版本, 請自行安裝 Sun 版本的 Java"
    51 check_sunJava_if_8="Java 版本太舊 (請更新至 1.6 以上版本)"
    52 check_sunJava_if_9="系統有 Sun Java 1.6 以上版本"
    53 check_sunJava_if_10="請自行安裝 Sun Java 1.6 以上版本"
     42MI_check_sunJava_1="check_sunJava"
     43MI_check_sunJava_2="NutchEz 需要 Sun Java JDK 1.6 以上的版本"
     44MI_check_sunJava_if_1="Java 並不是 Sun 版本, 請自行安裝 Sun 版本的 Java"
     45MI_check_sunJava_if_2="請輸入您的選擇: "
     46MI_check_sunJava_if_3="(1)系統沒有 Sun Java (2)Sun Java已安裝並於其他路徑 (3)結束"
     47MI_check_sunJava_if_4="請選擇 (1/2/3): "
     48MI_check_sunJava_if_5="請自行安裝 Sun Java 1.6 以上版本"
     49MI_check_sunJava_if_6="請輸入 Sum Java 的家路徑 (例如: '/usr/lib/jvm/java-6-sun-1.6.0.12'): "
     50MI_check_sunJava_if_7="Java 並不是 Sun 版本, 請自行安裝 Sun 版本的 Java"
     51MI_check_sunJava_if_8="Java 版本太舊 (請更新至 1.6 以上版本)"
     52MI_check_sunJava_if_9="系統有 Sun Java 1.6 以上版本"
     53MI_check_sunJava_if_10="請自行安裝 Sun Java 1.6 以上版本"
    5454 
    5555### [for check_ssh()] ###
    56 check_ssh_1="check_ssh"
    57 check_ssh_2="系統已有 ssh."
    58 check_ssh_3="請安裝 ssh."
    59 check_ssh_4="系統已有 ssh Server (sshd)."
    60 check_ssh_5="請安裝 ssh Server (sshd)."
     56MI_check_ssh_1="check_ssh"
     57MI_check_ssh_2="系統已有 ssh."
     58MI_check_ssh_3="請安裝 ssh."
     59MI_check_ssh_4="系統已有 ssh Server (sshd)."
     60MI_check_ssh_5="請安裝 ssh Server (sshd)."
    6161 
    6262### [for check_dialog()] ###
    63 check_dialog_1="check_dialog"
    64 check_dialog_2="系統已有 dialog."
    65 check_dialog_3="請安裝 dialog."
     63MI_check_dialog_1="check_dialog"
     64MI_check_dialog_2="系統已有 dialog."
     65MI_check_dialog_3="請安裝 dialog."
    6666     
    6767#
    68 set_nutchuser_passwd_echo_1="請輸入欲設定的nutchuser密碼:"
    69 set_nutchuser_passwd_echo_2="請再輸入一次確認密碼:"
    70 
    71 #
    72 select_eth_echo_1="系統偵測到目前擁有網卡如下:"
    73 select_eth_echo_2="請選擇欲給nutchez使用的網卡(1/2/3):"
    74 select_eth_echo_3="您選擇的網卡為:$net_choice"
    75 select_eth_echo_4="Master網路IP位址為:$net_address"
    76 select_eth_echo_5="Master的MAC為:$net_MacAddr"
    77 
    78 #
    79 make_ssh_key_echo_1="正在產生SSH Key... "
    80 make_ssh_key_echo_2="SSH Key已產生"
    81 
    82 #
    83 set_haoop_site_echo_1="正在設定hadoop-site.xml... "
    84 set_haoop_site_echo_2="hadoop-site.xml設定完成"
    85 
    86 #
    87 set_nutch_site_echo_1="正在設定nutch-site.xml..."
    88 set_nutch_site_echo_2="http.agent.url 設定行號為:$Line_NO..."
    89 set_nutch_site_echo_3="編輯http.agent.url, 刪除行號 $Line_NO."
    90 set_nutch_site_echo_4="編輯http.agent.url完成"
    91 set_nutch_site_echo_5="http.agent.email 設定行號為:$Line_NO."
    92 set_nutch_site_echo_6="編輯http.agent.email, 刪除行號 $Line_NO."
    93 set_nutch_site_echo_7="編輯http.agent.email完成"
    94 set_nutch_site_echo_8="hadoop-site.xml設定完成"
    95 
    96 #
    97 format_HDFS_echo_1="格式化HDFS..."
    98 format_HDFS_echo_2="格式化HDFS完成"
    99 
    100 #
    101 start_up_NutchEZ_echo_1="啟動NutchEZ..."
    102 
    103 #
    104 set_hosts_echo_1="設定master上的hosts"
    105 
    106 #
    107 install_Nutch_echo_1="Master的IP位址為:"
    108 install_Nutch_echo_2="Master的Hostname為:"
    109 
    110 #
    111 client_PassMasterIPAddr_echo_1="在client安裝檔修改MasterIP的行號: $Line_NO"
    112 client_PassMasterIPAddr_echo_2="編輯MasterIP..."
    113 client_PassMasterIPAddr_echo_3="完成編輯MasterIP."
    114 
    115 #
    116 client_PassMaster_Hostname_echo_1="在client安裝檔修改Hostname, 行號為: $Line_NO"
    117 client_PassMaster_Hostname_echo_2="編輯Hostname..."
    118 client_PassMaster_Hostname_echo_3="完成編輯Hostname."
    119 
    120 #
    121 make_client_install_echo_1="於function make_client_install ..."
    122 
    123 #
    124 start_up_tomcat_echo_1="啟動tomcat..."
    125 start_up_tomcat_echo_2="等待 $i 秒..."
    126 start_up_tomcat_echo_3="tomcat 已經啟動!"
    127 
    128 #
    129 client_install_commands_echo_1="Client安裝可參考以下指令:"
    130 client_install_commands_echo_2="cd ~"
    131 client_install_commands_echo_3="mkdir nutchez_client_install"
    132 client_install_commands_echo_4="cd nutchez_client_install"
    133 client_install_commands_echo_5="scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/* ."
    134 client_install_commands_echo_6="sudo su"
    135 client_install_commands_echo_7="./client_install"
     68MI_set_nutchuser_passwd_echo_1="請輸入欲設定的nutchuser密碼:"
     69MI_set_nutchuser_passwd_echo_2="請再輸入一次確認密碼:"
     70
     71#
     72MI_select_eth_echo_1="系統偵測到目前擁有網卡如下:"
     73MI_select_eth_echo_2="請選擇欲給nutchez使用的網卡(1/2/3):"
     74MI_select_eth_echo_3="您選擇的網卡為:$net_choice"
     75MI_select_eth_echo_4="Master網路IP位址為:$net_address"
     76MI_select_eth_echo_5="Master的MAC為:$net_MacAddr"
     77
     78#
     79MI_make_ssh_key_echo_1="正在產生SSH Key... "
     80MI_make_ssh_key_echo_2="SSH Key已產生"
     81
     82#
     83MI_set_haoop_site_echo_1="正在設定hadoop-site.xml... "
     84MI_set_haoop_site_echo_2="hadoop-site.xml設定完成"
     85
     86#
     87MI_set_nutch_site_echo_1="正在設定nutch-site.xml..."
     88MI_set_nutch_site_echo_2="http.agent.url 設定行號為:$Line_NO..."
     89MI_set_nutch_site_echo_3="編輯http.agent.url, 刪除行號 $Line_NO."
     90MI_set_nutch_site_echo_4="編輯http.agent.url完成"
     91MI_set_nutch_site_echo_5="http.agent.email 設定行號為:$Line_NO."
     92MI_set_nutch_site_echo_6="編輯http.agent.email, 刪除行號 $Line_NO."
     93MI_set_nutch_site_echo_7="編輯http.agent.email完成"
     94MI_set_nutch_site_echo_8="hadoop-site.xml設定完成"
     95
     96#
     97MI_format_HDFS_echo_1="格式化HDFS..."
     98MI_format_HDFS_echo_2="格式化HDFS完成"
     99
     100#
     101MI_start_up_NutchEZ_echo_1="啟動NutchEZ..."
     102
     103#
     104MI_set_hosts_echo_1="設定master上的hosts"
     105
     106#
     107MI_install_Nutch_echo_1="Master的IP位址為:"
     108MI_install_Nutch_echo_2="Master的Hostname為:"
     109
     110#
     111MI_client_PassMasterIPAddr_echo_1="在client安裝檔修改MasterIP的行號: $Line_NO"
     112MI_client_PassMasterIPAddr_echo_2="編輯MasterIP..."
     113MI_client_PassMasterIPAddr_echo_3="完成編輯MasterIP."
     114
     115#
     116MI_client_PassMaster_Hostname_echo_1="在client安裝檔修改Hostname, 行號為: $Line_NO"
     117MI_client_PassMaster_Hostname_echo_2="編輯Hostname..."
     118MI_client_PassMaster_Hostname_echo_3="完成編輯Hostname."
     119
     120#
     121MI_make_client_install_echo_1="於function make_client_install ..."
     122
     123#
     124MI_start_up_tomcat_echo_1="啟動tomcat..."
     125MI_start_up_tomcat_echo_2="等待約10秒..."
     126MI_start_up_tomcat_echo_3="tomcat 已經啟動!"
     127
     128#
     129MI_client_install_commands_echo_1="Client安裝可參考以下指令:"
     130MI_client_install_commands_echo_2="cd ~"
     131MI_client_install_commands_echo_3="mkdir nutchez_client_install"
     132MI_client_install_commands_echo_4="cd nutchez_client_install"
     133MI_client_install_commands_echo_5="scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/* ."
     134MI_client_install_commands_echo_6="sudo su"
     135MI_client_install_commands_echo_7="./client_install"
    136136
    137137########## Lang for Master Install - End##########
     
    235235
    236236# check root
    237 check_root_1="請切換成 root 身份執行移除程式!!!"
    238 check_root_2="已確認為root身份, 將繼續執行此移除程式!"
     237MR_check_root_1="請切換成 root 身份執行移除程式!!!"
     238MR_check_root_2="已確認為root身份, 將繼續執行此移除程式!"
    239239
    240240# shutdown service
    241 shutdown_service_echo_1="停止其他尚未關閉的slaves服務..."
    242 shutdown_service_echo_2="關閉本機服務..."
    243 shutdown_service_echo_3="本機服務已關閉"
     241MR_shutdown_service_echo_1="停止其他尚未關閉的slaves服務..."
     242MR_shutdown_service_echo_2="關閉本機服務..."
     243MR_shutdown_service_echo_3="本機服務已關閉"
    244244
    245245# remove_folders
    246 remove_folders_echo_1="正在刪除安裝時所建立的檔案及資料夾..."
    247 remove_folders_echo_2="安裝時所建立的檔案及資料夾已刪除"
     246MR_remove_folders_echo_1="正在刪除安裝時所建立的檔案及資料夾..."
     247MR_remove_folders_echo_2="安裝時所建立的檔案及資料夾已刪除"
    248248
    249249# edit_hosts
    250 edit_hosts_echo_1="修改/etc/hosts..."
    251 edit_hosts_echo_2="完成修改/etc/hosts"
     250MR_edit_hosts_echo_1="還原/etc/hosts...至安裝NutchEZ前的版本"
     251MR_edit_hosts_echo_2="完成修改/etc/hosts"
    252252
    253253# user_delete
    254 user_delete_echo_1="正在刪除nutchuser使用者..."
    255 user_delete_echo_2="使用者nutchuser已刪除"
     254MR_user_delete_echo_1="正在刪除nutchuser使用者..."
     255MR_user_delete_echo_2="使用者nutchuser已刪除"
    256256
    257257# main
    258 main_echo_1="警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
    259 main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。"
    260 main_echo_3="請問是否確定移除此一節點:1.確定 2.取消"
    261 main_echo_4="移除程序已完成!"
    262 main_echo_5="您已取消移除程序!"
    263 main_echo_6="若要移除請再重新執行!"
     258MR_main_echo_1="警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
     259MR_main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。"
     260MR_main_echo_3="請問是否確定移除此一節點:1.確定 2.取消"
     261MR_main_echo_4="移除程序已完成!"
     262MR_main_echo_5="您已取消移除程序!"
     263MR_main_echo_6="若要移除請再重新執行!"
    264264
    265265########## Lang for Master Remove - End ##########
     
    267267########## Lang for Client Remove - Start ##########
    268268# check root
    269 check_root_1="請切換成 root 身份執行移除程式!!!"
    270 check_root_2="已確認為root身份, 將繼續執行此移除程式!"
     269CR_check_root_1="請切換成 root 身份執行移除程式!!!"
     270CR_check_root_2="已確認為root身份, 將繼續執行此移除程式!"
    271271
    272272# shutdown service
    273 shutdown_service_echo_1="關閉本機服務..."
    274 shutdown_service_echo_2="本機服務已關閉"
     273CR_shutdown_service_echo_1="關閉本機服務..."
     274CR_shutdown_service_echo_2="本機服務已關閉"
    275275
    276276# remove_folders
    277 remove_folders_echo_1="正在刪除安裝時所建立的檔案及資料夾..."
    278 remove_folders_echo_2="安裝時所建立的檔案及資料夾已刪除"
     277CR_remove_folders_echo_1="正在刪除安裝時所建立的檔案及資料夾..."
     278CR_remove_folders_echo_2="安裝時所建立的檔案及資料夾已刪除"
    279279
    280280# edit_hosts
    281 edit_hosts_echo_1="修改/etc/hosts..."
    282 edit_hosts_echo_2="完成修改/etc/hosts"
     281CR_edit_hosts_echo_1="還原/etc/hosts...至安裝NutchEZ前的版本"
     282CR_edit_hosts_echo_2="完成修改/etc/hosts"
    283283
    284284# user_delete
    285 user_delete_echo_1="正在刪除nutchuser使用者..."
    286 user_delete_echo_2="使用者nutchuser已刪除"
     285CR_user_delete_echo_1="正在刪除nutchuser使用者..."
     286CR_user_delete_echo_2="使用者nutchuser已刪除"
    287287
    288288# main
    289 main_echo_1="警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
    290 main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。"
    291 main_echo_3="請問是否確定移除此一節點:1.確定 2.取消"
    292 main_echo_4="移除程序已完成!"
    293 main_echo_5="您已取消移除程序!"
    294 main_echo_6="若要移除請再重新執行!"
     289CR_main_echo_1="警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
     290CR_main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。"
     291CR_main_echo_3="請問是否確定移除此一節點:1.確定 2.取消"
     292CR_main_echo_4="移除程序已完成!"
     293CR_main_echo_5="您已取消移除程序!"
     294CR_main_echo_6="若要移除請再重新執行!"
    295295########## Lang for Client Remove - End ##########
    296296
  • nutchez-0.2/src/test/language_choise.sh

    r116 r213  
    1313        ;;
    1414  zh)
    15         ln -sf ./install_lang.zh ./install_lang
     15#        ln -sf ./install_lang.zh ./install_lang
     16        ln -sf lang/lang_zh_TW lang_link
    1617  echo "你選擇了中文"
    1718        break;
  • nutchez-0.2/src/test/master_remove.sh

    r206 r213  
    3333  debug_info "check_root"
    3434  if [ $USER != "root" ]; then
    35     show_info "$check_root_1" # "請切換成 root 身份執行移除程式!!!"
     35    show_info "$MR_check_root_1" # "請切換成 root 身份執行移除程式!!!"
    3636    exit
    3737  fi
    38   show_info "$check_root_2" # "已確認為root身份, 將繼續執行此移除程式!"
     38  show_info "$MR_check_root_2" # "已確認為root身份, 將繼續執行此移除程式!"
    3939}
    4040
    4141# shutdown service
    4242function shutdown_service () {
    43   show_info "$shutdown_service_echo_1" # "停止其他尚未關閉的slaves服務..."
     43  show_info "$MR_shutdown_service_echo_1" # "停止其他尚未關閉的slaves服務..."
    4444  slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1`
    4545  for nutch_node in $slaves_list
     
    4848    su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"
    4949  done
    50   show_info "$shutdown_service_echo_2" # "關閉本機服務..."
     50  show_info "$MR_shutdown_service_echo_2" # "關閉本機服務..."
    5151  su nutchuser -c "/opt/nutchez/nutch/bin/stop-all.sh"
    5252  su nutchuser -c "/opt/nutchez/tomcat/bin/shutdown.sh"
    53   show_info "$shutdown_service_echo_3" # "本機服務已關閉"
     53  show_info "$MR_shutdown_service_echo_3" # "本機服務已關閉"
    5454}
    5555
    5656# 移除檔案及資料夾
    5757function remove_folders () {
    58   show_info "$remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."
     58  show_info "$MR_remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."
    5959  rm -rf /opt/nutchez
    6060  rm -rf /var/nutchez
    61   show_info "$remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除"
     61  show_info "$MR_remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除"
    6262}
    6363
     
    6565# 還原/etc/hosts
    6666function edit_hosts () {
    67   show_info "$edit_hosts_echo_1" # "修改/etc/hosts..."
    68   slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1`
    69   for nutch_node in $slaves_list
    70   do
    71     Line_NO=`cat /etc/hosts | grep -n $nutch_node | sed 's/:.*//g'`
    72     if [[ $Line_NO -ge 1 ]]; then
    73       sed -i ''$Line_NO'd' /etc/hosts
    74     fi
    75   done
    76   show_info "$edit_hosts_echo_2" # "完成修改/etc/hosts"
     67  show_info "$MR_edit_hosts_echo_1" # "修改/etc/hosts..."
     68#  slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1`
     69#  for nutch_node in $slaves_list
     70#  do
     71#    Line_NO=`cat /etc/hosts | grep -n $nutch_node | sed 's/:.*//g'`
     72#    if [[ $Line_NO -ge 1 ]]; then
     73#      sed -i ''$Line_NO'd' /etc/hosts
     74#    fi
     75#  done
     76  cat > /etc/hosts < /home/nutchuser/nutchez/system/hosts.bak
     77  show_info "$MR_edit_hosts_echo_2" # "完成修改/etc/hosts"
    7778}
    7879
    7980# 移除使用者
    8081function user_delete () {
    81   show_info "$user_delete_echo_1" # "正在刪除nutchuser使用者..."
     82  show_info "$MR_user_delete_echo_1" # "正在刪除nutchuser使用者..."
    8283  userdel -r nutchuser
    83   show_info "$user_delete_echo_2" # "使用者nutchuser已刪除"
     84  show_info "$MR_user_delete_echo_2" # "使用者nutchuser已刪除"
    8485}
    8586
    8687# Main function
    8788function main () {
    88   show_info "$main_echo_1" #"警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
    89   show_info "$main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"
     89  show_info "$MR_main_echo_1" #"警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
     90  show_info "$MR_main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"
    9091# 詢問是否繼續
    91   read -p "$main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消"
     92  read -p "$MR_main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消"
    9293# 確認移除
    9394  if [ $confirm -eq 1 ]; then
     
    9798    edit_hosts
    9899    user_delete
    99     show_info "$main_echo_4" # "移除程序已完成!"
     100    show_info "$MR_main_echo_4" # "移除程序已完成!"
    100101  elif [ $confirm -eq 2 ]; then
    101     show_info "$main_echo_5" # "您已取消移除程序!"
    102     show_info "$main_echo_6" # "若要移除請再重新執行!"
     102    show_info "$MR_main_echo_5" # "您已取消移除程序!"
     103    show_info "$MR_main_echo_6" # "若要移除請再重新執行!"
    103104  fi
    104105}
Note: See TracChangeset for help on using the changeset viewer.