Changeset 203


Ignore:
Timestamp:
Jun 17, 2010, 4:51:05 PM (15 years ago)
Author:
shunfa
Message:

修改語言檔

Location:
nutchez-0.2/src/test
Files:
5 edited

Legend:

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

    r200 r203  
    4646# shutdown service
    4747function shutdown_service () {
    48   show_info $shutdown_service_echo_1 # "關閉本機服務..."
     48  show_info "$shutdown_service_echo_1" # "關閉本機服務..."
    4949  su nutchuser -c "/opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode"
    5050  su nutchuser -c "/opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker"
    51   show_info $shutdown_service_echo_2 # "本機服務已關閉"
     51  show_info "$shutdown_service_echo_2" # "本機服務已關閉"
    5252}
    5353
    5454# 移除檔案及資料夾
    5555function remove_folders () {
    56   show_info $remove_folders_echo_1 # "正在刪除安裝時所建立的檔案及資料夾..."
     56  show_info "$remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."
    5757  rm -rf /opt/nutchez/*
    5858  rm -rf /var/nutchez/*
    59   show_info $remove_folders_echo_2 # "安裝時所建立的檔案及資料夾已刪除"
     59  show_info "$remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除"
    6060}
    6161
     
    6363# 還原/etc/hosts
    6464function edit_hosts () {
    65   show_info $edit_hosts_echo_1 # "修改/etc/hosts..."
     65  show_info "$edit_hosts_echo_1" # "修改/etc/hosts..."
    6666  Line_NO=`cat /etc/hosts | grep -n $Master_IP_Address | sed 's/:.*//g'`
    6767  sed -i ''$Line_NO'd' /etc/hosts
    68   show_info $edit_hosts_echo_2 # "完成修改/etc/hosts"
     68  show_info "$edit_hosts_echo_2" # "完成修改/etc/hosts"
    6969}
    7070
     
    7272# 移除使用者
    7373function user_delete () {
    74   show_info $user_delete_echo_1 # "正在刪除nutchuser使用者..."
     74  show_info "$user_delete_echo_1" # "正在刪除nutchuser使用者..."
    7575  userdel -r nutcheruser
    76   show_info $user_delete_echo_2 # "使用者nutchuser已刪除"
     76  show_info "$user_delete_echo_2" # "使用者nutchuser已刪除"
    7777}
    7878
    7979# Main function
    8080function main () {
    81   show_info $main_echo_1 #"警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
    82   show_info $main_echo_2 #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"
     81  show_info "$main_echo_1" #"警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
     82  show_info "$main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"
    8383# 詢問是否繼續
    8484  read -p "$main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消"
     
    9090    edit_hosts
    9191    user_delete
    92     show_info $main_echo_4 # "移除程序已完成!"
     92    show_info "$main_echo_4" # "移除程序已完成!"
    9393  elif [ $confirm -eq 2 ]; then
    94     show_info $main_echo_5 # "您已取消移除程序!"
    95     show_info $main_echo_6 # "若要移除請再重新執行!"
     94    show_info "$main_echo_5" # "您已取消移除程序!"
     95    show_info "$main_echo_6" # "若要移除請再重新執行!"
    9696  fi
    9797}
  • nutchez-0.2/src/test/install_func.sh

    r199 r203  
    234234  else
    235235    declare -i i=1
    236     show_info $select_eth_echo_1
     236    show_info "$select_eth_echo_1"
    237237#   show_info  "\nSystem have multiple network device, which network use for this machine: "
    238238
     
    242242        i=i+1
    243243      done
    244       read -p "$select_eth_echo_2 " net_choice
     244      read -p "$select_eth_echo_2" net_choice
    245245#     read -p "Please choice(1/2/3...): " net_choice
    246246    if [ -z $net_choice ]; then
     
    248248    fi
    249249
    250     show_info $select_eth_echo_3
     250    show_info "$select_eth_echo_3"
    251251#   show_info "Your choice is $net_choice"
    252252    net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice)
     
    255255    net_MacAddr=$(ifconfig $net_interface | grep 'HW' | sed 's/^.*HWaddr //g')
    256256
    257     show_info $select_eth_echo_4
     257    show_info "$select_eth_echo_4"
    258258#   show_info "net_address is $net_address"
    259     show_info $select_eth_echo_5
     259    show_info "$select_eth_echo_5"
    260260#   show_info "net_MacAddr is $net_MacAddr"
    261261  fi
     
    269269
    270270function make_ssh_key () {
    271   debug_info $make_ssh_key_echo_1
     271  debug_info "$make_ssh_key_echo_1"
    272272# debug_info "Make ssh key(begin...)"
    273273  su nutchuser -c 'ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ""'
    274274  su nutchuser -c "cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys"
    275275  su nutchuser -c "ssh-add /home/nutchuser/.ssh/id_rsa"
    276   debug_info $make_ssh_key_echo_2
     276  debug_info "$make_ssh_key_echo_2"
    277277# debug_info "Make ssh key(done!)"
    278278}
     
    280280
    281281function set_haoop-site () {
    282   debug_info $set_haoop_site_echo_1
     282  debug_info "$set_haoop_site_echo_1"
    283283# debug_info "set hadoop-site.xml(begin...)"
    284284  cd $Nutch_HOME/conf/
     
    299299</configuration>
    300300EOF
    301   debug_info $set_haoop_site_echo_2
     301  debug_info "$set_haoop_site_echo_2"
    302302# debug_info "set hadoop-site.xml(done!)"
    303303}
     
    305305# 修改nutch-site.xml中-http.agent.url, http.agent.email
    306306function set_nutch-site () {
    307   debug_info $set_haoop_site_echo_1
     307  debug_info "$set_haoop_site_echo_1"
    308308# debug_info "set nutch-site.xml(begin...)"
    309309  Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.url' | sed 's/:.*//g'`
    310   debug_info $set_haoop_site_echo_2
     310  debug_info "$set_haoop_site_echo_2"
    311311# debug_info "debug...http.agent.url line number = $Line_NO..."
    312312  sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml
    313   debug_info $set_haoop_site_echo_3
     313  debug_info "$set_haoop_site_echo_3"
    314314# debug_info "debug...edit http.agent.url delete line $((Line_NO+1))..."
    315315  sed -i ''$Line_NO'a <value>'$MasterIP_Address'</value>' $Nutch_HOME/conf/nutch-site.xml
    316   debug_info $set_haoop_site_echo_4
     316  debug_info "$set_haoop_site_echo_4"
    317317# debug_info "debug...edit http.agent.url done..."
    318318
    319319  Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.email' | sed 's/:.*//g'`
    320   debug_info $set_haoop_site_echo_5
     320  debug_info "$set_haoop_site_echo_5"
    321321# debug_info "debug...http.agent.email line number = $Line_NO..."
    322322
    323323  sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml
    324   debug_info $set_haoop_site_echo_6
     324  debug_info "$set_haoop_site_echo_6"
    325325# debug_info "debug...edit http.agent.email delete line $((Line_NO+1))..."
    326326  sed -i ''$Line_NO'a <value>'$Admin_email'</value>' $Nutch_HOME/conf/nutch-site.xml
    327   debug_info $set_haoop_site_echo_7
     327  debug_info "$set_haoop_site_echo_7"
    328328# debug_info "debug...edit http.agent.email done..."
    329   debug_info $set_haoop_site_echo_8
     329  debug_info "$set_haoop_site_echo_8"
    330330# debug_info "set nutch-site.xml(done!)"
    331331}
    332332
    333333function format_HDFS () {
    334   debug_info $format_HDFS_echo_1
     334  debug_info "$format_HDFS_echo_1"
    335335  su nutchuser -c "$Nutch_HOME/bin/hadoop namenode -format"
    336   debug_info $format_HDFS_echo_2
     336  debug_info "$format_HDFS_echo_2"
    337337}
    338338
    339339function start_up_NutchEZ (){
    340   debug_info $start_up_NutchEZ_echo_1
     340  debug_info "$start_up_NutchEZ_echo_1"
    341341# debug_info "start up NutchEZ..."
    342342  su nutchuser -c "$Nutch_HOME/bin/start-all.sh"
     
    345345
    346346function set_hosts () {
    347   debug_info $set_hosts_echo_1
     347  debug_info "$set_hosts_echo_1"
    348348  Line_NO=`cat /etc/hosts | grep -n $(hostname) | sed 's/:.*//g'`
    349349  content=$(cat /etc/hosts | awk 'NR=='$Line_NO'{printf "# " ; print}' )
     
    353353
    354354function Install_Nutch () {
    355   debug_info $install_Nutch_echo_1
     355  debug_info "$install_Nutch_echo_1"
    356356# debug_info "MasterIP_Address=$MasterIP_Address"
    357   debug_info $install_Nutch_echo_2
     357  debug_info "$install_Nutch_echo_2"
    358358# debug_info "Master_Hostname=$(hostname)"
    359359  su nutchuser -c "echo $net_address $(hostname) $net_MacAddr \>\> ~/nutchez/system/nutch_nodes"
     
    367367  cd $Start_PATH
    368368  Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'`
    369   debug_info $client_PassMasterIPAddr_echo_1
     369  debug_info "$client_PassMasterIPAddr_echo_1"
    370370# debug_info "debug...Master IP here line number = $Line_NO..."
    371371  sed -i ''$((Line_NO+1))'d' client_install
    372   debug_info $client_PassMasterIPAddr_echo_2
     372  debug_info "$client_PassMasterIPAddr_echo_2"
    373373# debug_info "debug...edit Master IP at line $((Line_NO+1))..."
    374374  sed -i ''$Line_NO'a Master_IP_Address='$MasterIP_Address'' client_install
    375   debug_info $client_PassMasterIPAddr_echo_3
     375  debug_info "$client_PassMasterIPAddr_echo_3"
    376376# debug_info "edit client_install done..."
    377377}
     
    381381  cd $Start_PATH
    382382  Line_NO=`cat client_install | grep -n '# Master Hostname here' | sed 's/:.*//g'`
    383   debug_info $client_PassMaster_Hostname_echo_1
     383  debug_info "$client_PassMaster_Hostname_echo_1"
    384384# debug_info "debug...Master hostname here line number = $Line_NO..."
    385385  sed -i ''$((Line_NO+1))'d' client_install
    386   debug_info $client_PassMaster_Hostname_echo_2
     386  debug_info "$client_PassMaster_Hostname_echo_2"
    387387# debug_info "debug...edit Master Hostname at line $((Line_NO+1))..."
    388388  sed -i ''$Line_NO'a Master_Hostname='$(hostname)'' client_install
    389   debug_info $client_PassMaster_Hostname_echo_3
     389  debug_info "$client_PassMaster_Hostname_echo_3"
    390390# debug_info "edit client_install done..."
    391391}
     
    399399  # 打包安裝目錄(不含tomcat)
    400400 
    401   debug_info $make_client_install_echo_1
     401  debug_info "$make_client_install_echo_1"
    402402# debug_info "function make_client_install..."
    403403
     
    413413
    414414function start_up_tomcat () {
    415   debug_info $start_up_tomcat_echo_1
     415  debug_info "$start_up_tomcat_echo_1"
    416416# debug_info "start up tomcat..."
    417417
     
    420420    do
    421421      sleep 1s
    422       debug_info $start_up_tomcat_echo_2
     422      debug_info "$start_up_tomcat_echo_2"
    423423#     debug_info "wait $i sec..."
    424424      i=`expr $i - 1`
    425425    done
    426426  su nutchuser -c "$Tomcat_HOME/bin/startup.sh"
    427   debug_info $start_up_tomcat_echo_3
     427  debug_info "$start_up_tomcat_echo_3"
    428428# debug_info "tomcat has been started..."
    429429}
     
    432432# client簡易步驟
    433433function client_install_commands () {
    434   show_info $client_install_commands_echo_1
    435   show_info $client_install_commands_echo_2
    436   show_info $client_install_commands_echo_3
    437   show_info $client_install_commands_echo_4
    438   show_info $client_install_commands_echo_5
    439   show_info $client_install_commands_echo_6
    440   show_info $client_install_commands_echo_7
     434  show_info "$client_install_commands_echo_1"
     435  show_info "$client_install_commands_echo_2"
     436  show_info "$client_install_commands_echo_3"
     437  show_info "$client_install_commands_echo_4"
     438  show_info "$client_install_commands_echo_5"
     439  show_info "$client_install_commands_echo_6"
     440  show_info "$client_install_commands_echo_7"
    441441
    442442
  • nutchez-0.2/src/test/lang_zh_TW_client_install

    r195 r203  
    1313par_echo_1="Master 的 IP位址: "
    1414par_echo_2="資料是否正確 (yes/no): "
    15 par_echo_3="資料是正的"
     15par_echo_3="資料是正的"
    1616par_echo_4="請修改為正確的參數"
    1717
  • nutchez-0.2/src/test/lang_zh_TW_client_remove

    r200 r203  
    3030
    3131# main
    32 main_echo_1="警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
     32main_echo_1="警告-此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
    3333main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。"
    3434main_echo_3="請問是否確定移除此一節點:1.確定 2.取消"
  • nutchez-0.2/src/test/master_remove.sh

    r202 r203  
    4141# shutdown service
    4242function shutdown_service () {
    43   show_info $shutdown_service_echo_1 # "停止其他尚未關閉的slaves服務..."
     43  show_info "$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 "$shutdown_service_echo_2" # "關閉本機服務..."
    5151  su nutchuser -c "/opt/nutchez/nutch/bin/stop-all.sh"
    52   show_info $shutdown_service_echo_3 # "本機服務已關閉"
     52  show_info "$shutdown_service_echo_3" # "本機服務已關閉"
    5353}
    5454
    5555# 移除檔案及資料夾
    5656function remove_folders () {
    57   show_info $remove_folders_echo_1 # "正在刪除安裝時所建立的檔案及資料夾..."
     57  show_info "$remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."
    5858  rm -rf /opt/nutchez/*
    5959  rm -rf /var/nutchez/*
    60   show_info $remove_folders_echo_2 # "安裝時所建立的檔案及資料夾已刪除"
     60  show_info "$remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除"
    6161}
    6262
     
    6464# 還原/etc/hosts
    6565function edit_hosts () {
    66   show_info $edit_hosts_echo_1 # "修改/etc/hosts..."
     66  show_info "$edit_hosts_echo_1" # "修改/etc/hosts..."
    6767 
    6868  slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1`
     
    7272    sed -i ''$Line_NO'd' /etc/hosts
    7373  done
    74   show_info $edit_hosts_echo_2 # "完成修改/etc/hosts"
     74  show_info "$edit_hosts_echo_2" # "完成修改/etc/hosts"
    7575}
    7676
    7777# 移除使用者
    7878function user_delete () {
    79   show_info $user_delete_echo_1 # "正在刪除nutchuser使用者..."
     79  show_info "$user_delete_echo_1" # "正在刪除nutchuser使用者..."
    8080  userdel -r nutcheruser
    81   show_info $user_delete_echo_2 # "使用者nutchuser已刪除"
     81  show_info "$user_delete_echo_2" # "使用者nutchuser已刪除"
    8282}
    8383
    8484# Main function
    8585function main () {
    86   show_info $main_echo_1 #"警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
    87   show_info $main_echo_2 #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"
     86  show_info "$main_echo_1" #"警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"
     87  show_info "$main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"
    8888# 詢問是否繼續
    8989  read -p "$main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消"
     
    9595    edit_hosts
    9696    user_delete
    97     show_info $main_echo_4 # "移除程序已完成!"
     97    show_info "$main_echo_4" # "移除程序已完成!"
    9898  elif [ $confirm -eq 2 ]; then
    99     show_info $main_echo_5 # "您已取消移除程序!"
    100     show_info $main_echo_6 # "若要移除請再重新執行!"
     99    show_info "$main_echo_5" # "您已取消移除程序!"
     100    show_info "$main_echo_6" # "若要移除請再重新執行!"
    101101  fi
    102102}
Note: See TracChangeset for help on using the changeset viewer.