Changeset 188 for nutchez-0.2/src/test/client_install_func.sh
- Timestamp:
- Jun 14, 2010, 6:04:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.