Changeset 188
- Timestamp:
- Jun 14, 2010, 6:04:14 PM (14 years ago)
- Location:
- nutchez-0.2/src/test
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install
r169 r188 35 35 } 36 36 37 # Language Choice 38 choose_lang 39 37 40 # 參數詢問 38 41 yesno="no" 39 show_info " Your master IP:$Master_IP_Address"40 read -p " Is this data cooect? (yes/no):" yesno42 show_info "$par_echo_1 $Master_IP_Address" 43 read -p "$par_echo_2" yesno 41 44 42 45 if [ "$yesno" == "yes" ] || [ "$yesno" == "y" ] ; then 43 show_info " These parameters are correct."46 show_info "$par_echo_3" 44 47 else 45 show_info " Please edit these parameters in this file."48 show_info "$par_echo_4" 46 49 exit 47 50 fi 48 51 49 # 功能邏輯區50 51 52 # 程式邏輯區53 52 54 53 # 檢查執行這個程式的是否為root權限 … … 82 81 read 83 82 84 85 83 # 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼 86 84 creat_nutchuser_account 87 85 read 88 89 86 90 87 # scp nutchuser@master_ip:~ 把.ssh/目錄複製下來 … … 93 90 scp_master_nutchuser_sshkey $Master_IP_Address 94 91 read 95 96 92 97 93 # 用scp 複製 master 的設定與安裝資料 -
nutchez-0.2/src/test/client_install_func.sh
r178 r188 21 21 22 22 23 # choose Language 24 function choose_lang(){ 25 26 echo -e "\n$choose_lang_1" 27 read -p "$choose_lang_2 " langChoice 28 29 if [ $langChoice == "2" ]; then 30 source lang_zh_TW_client_install 31 else 32 source lang_en_US_client_install 33 fi 34 } 35 23 36 # 檢查執行這個程式的是否為root權限 24 37 function check_root(){ … … 26 39 debug_info "check_root" 27 40 if [ $USER != "root" ]; then 28 show_info " Please Change root to execute it!!!"41 show_info "$check_root_1" 29 42 exit 30 43 fi 31 44 # 正式版後可拿掉此 echo 32 show_info " Identify is root."45 show_info "$check_root_2" 33 46 } 34 47 … … 36 49 # 查出此主機的作業系統,以及版本 37 50 function 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" 40 53 Linux_Distribution=$(lsb_release -a 2> /dev/null | grep "Distributor ID:" | awk '{print $3}') 41 54 Linux_Version=$(lsb_release -a 2> /dev/null | grep "Release" | awk '{print $2}') … … 47 60 function install_packages(){ 48 61 # deb 系列系統 49 debug_info " install_packages"50 debug_info " Check dependent packages"62 debug_info "$install_pack_1" 63 debug_info "$install_pack_2" 51 64 if [ "$Linux_Distribution" == "Ubuntu" ] || [ "$Linux_Distribution" == "Debian" ] ;then 52 echo -e "\n It will install sime packages (expect, ssh, and dialog).\n"65 echo -e "\n$install_pack_if_1\n" 53 66 aptitude install -y expect ssh dialog 54 67 # rpm 系列系統 55 68 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" 61 72 fi 62 73 }
Note: See TracChangeset
for help on using the changeset viewer.