Changeset 237 for nutchez-0.2/src/shell


Ignore:
Timestamp:
Jun 29, 2010, 10:51:15 AM (14 years ago)
Author:
shunfa
Message:

管理介面新增選項 - "回主選單"

Location:
nutchez-0.2/src/shell
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/shell/lang/lang_en_US

    r215 r237  
    308308dia_back='= [NutchEz Management Interface] ~by NCHC ='
    309309dia_choose="Please choose what you want to do: "
     310dia_backto_main="Back to Main Menu"
    310311dia_exit="Exit"
    311312
  • nutchez-0.2/src/shell/lang/lang_zh_TW

    r214 r237  
    310310dia_back='= [NutchEz 管理介面] ~by NCHC ='
    311311dia_choose="請選擇: "
     312dia_backto_main="回主選單"
    312313dia_exit="結束"
    313314
     
    333334## [Lang for cluster_status()] ##
    334335cluster_status_echo_1="[IP] \t\t [Hostname] \t [Network] \t [Dtatnode & Tasktracker]"
    335 cluster_status_echo_2="開始檢查 Cluster..."
     336cluster_status_echo_2="開始檢查 Cluster...請稍候(node數越多,等待時間越長) "
    336337cluster_status_read_1="請輸入任何鍵繼續..."
    337338dia_cluster_status_title_1="[Cluster 狀態]"
  • nutchez-0.2/src/shell/nutchez

    r228 r237  
    3737
    3838# if lang=zh then source lang_zh_TW_nutchez
    39 echo $lang | grep 'zh' && source $Work_Path/lang/lang_zh_TW_nutchez
     39echo $lang | grep 'zh' && source $Work_Path/lang/lang_zh_TW
    4040}
    4141
     
    157157    "stop" "$dia_server_menu_1_2" \
    158158    "restart" "$dia_server_menu_1_3" \
    159     "exit" "$dia_exit" 2>$serverSetup
     159    "main" "$dia_backto_main" 2>$serverSetup
    160160
    161161if [ "$(cat $serverSetup)" == "start" ]; then
    162162    $NutchEZ_Install_PATH/nutch/bin/start-dfs.sh
    163163    $NutchEZ_Install_PATH/nutch/bin/start-mapred.sh
     164    # Back to main menu                                                                                   
     165    main_menu
     166    menu_choose
    164167elif [ "$(cat $serverSetup)" == "stop" ]; then
    165168    $NutchEZ_Install_PATH/nutch/bin/stop-dfs.sh
    166169    $NutchEZ_Install_PATH/nutch/bin/stop-mapred.sh
     170    # Back to main menu                                                                                   
     171    main_menu
     172    menu_choose
    167173elif [ "$(cat $serverSetup)" == "restart" ]; then
    168174    $NutchEZ_Install_PATH/nutch/bin/stop-dfs.sh
     
    170176    $NutchEZ_Install_PATH/nutch/bin/start-dfs.sh
    171177    $NutchEZ_Install_PATH/nutch/bin/start-mapred.sh
    172 else
    173     exit
    174 fi
    175 
    176178    # Back to main menu                                                                                   
    177     main_menu       
    178     menu_choose
     179    main_menu
     180    menu_choose
     181elif [ "$(cat $serverSetup)" == "main" ]; then
     182    main_menu
     183    menu_choose
     184else
     185    exit
     186fi
     187
    179188}
    180189
     
    195204    "All" "$dia_cluster_setup_menu_1_1" \
    196205    "Part" "$dia_cluster_setup_menu_1_2" \
    197     "Exit" "$dia_exit" 2>$allpart
     206    "Main" "$dia_backto_main" 2>$allpart
    198207
    199208# 判斷是否選 all 和 part,若是 all 直接到服務選單,若是 part 則先到機器選單
     
    204213    --checklist "$dia_cluster_setup_check_1" 15 55 7 $(cat $NutchEZ_HOME/system/nutch_nodes | \
    205214    grep -v '^$' | grep -v '#'  | awk '{print $1 "\t" $2 "\t" "$LIST_status" }') 2>$runNodes
     215elif [ "$(cat $allpart)" == "Main" ]; then
     216    main_menu
     217    menu_choose
    206218else
    207219    exit
     
    219231    "stop" "$dia_cluster_setup_menu_2_2" \
    220232    "restart" "$dia_cluster_setup_menu_2_3" \
    221     "exit" "$dia_exit" 2>$clusterSetup
     233    "main" "$dia_backto_maibackto_main" >$clusterSetup
    222234
    223235if [ "$(cat $clusterSetup)" == "start" ]; then
     
    229241        [ $? == "0" ] || echo "$cluster_setup_echo_error $node !!!"
    230242    done
     243    main_menu
     244    menu_choose
    231245elif [ "$(cat $clusterSetup)" == "stop" ]; then
    232246    echo -e "\n$cluster_setup_echo_3"
     
    237251        [ $? == "0" ] || echo "$cluster_setup_echo_error $node !!!"
    238252    done
     253    main_menu
     254    menu_choose
    239255elif [ "$(cat $clusterSetup)" == "restart"  ]; then
    240256    echo -e "\n$cluster_setup_echo_5"
     
    247263        [ $? == "0" ] || echo "$cluster_setup_echo_error $node !!!"
    248264    done
    249 else
    250     exit
    251 fi
    252 
    253     # Back to main menu                                                                                   
    254     main_menu       
    255     menu_choose
     265    main_menu
     266    menu_choose
     267else   
     268    exit
     269fi
     270
     271   # Back to main menu                                                                                   
     272#    main_menu       
     273#    menu_choose
    256274}
    257275
     
    272290        "stop" "$dia_tomcat_switch_menu_1_2" \
    273291        "restart" "$dia_tomcat_switch_menu_1_3" \
    274         "exit" "$dia_exit" 2>$tomcatSwitch
     292        "main" "$dia_backto_main" 2>$tomcatSwitch
    275293
    276294if [ "$(cat $tomcatSwitch)" == "exit" ]; then
    277295    exit 0
     296
     297elif [ "$(cat $tomcatSwitch)" == "main" ]; then
     298    main_menu
     299    menu_choose
    278300fi
    279301
     
    358380    "en_US" "$dia_lang_menu_1_1" \
    359381    "zh_TW" "$dia_lang_menu_1_2" \
    360     "Exit" "$dia_exit" 2>$langSwitch
     382    "main" "$dia_backto_main" 2>$langSwitch
    361383#
    362384if [ "$(cat $langSwitch)" == "Exit" ]; then
Note: See TracChangeset for help on using the changeset viewer.