Changeset 132 for nutchez-0.2/src/test/client_install_func.sh
- Timestamp:
- May 28, 2010, 10:08:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install_func.sh
r129 r132 27 27 echo -e "\n= check_systemInfo (debug) =" 28 28 echo -e "\nYour system information are:" 29 lsb_release -a 2>/dev/null 29 distribution=$(lsb_release -d 2>/dev/null) 30 Linux_Distribution=$(echo $distribution | awk '{print $2}') 31 Linux_Version=$(echo $distribution | awk '{print $3}') 32 echo $Linux_Distribution , $Linux_Version 33 unset distribution 34 } 35 36 37 # 安裝需要的相依套件 (目前只支援 deb 套件的系統自動安裝,yum或其他套件系統的則需手動安裝) 38 function install_packages(){ 39 # deb 系列系統 40 if [ "$Linux_Distribution" == "Ubuntu" ] || [ "$Linux_Distribution" == "Debian" ] ;then 41 aptitude install -y expect ssh dialog 42 # rpm 系列系統 43 elif [ "$Linux_Distribution" == "Fedora" ] || [ "$Linux_Distribution" == "CentOS" ] ;then 44 echo -e "Plz install expect, ssh, and dialog." 45 fi 30 46 } 31 47 … … 35 51 function check_nez_installed(){ 36 52 echo -e "\n= chcheck_nez_installed (debug) =" 37 test -d /opt/nutchez && echo -e "\nYour system already had NutchEz." || \ 38 echo -e "\nYour system does not has NutchEz." 53 if [ -d /opt/nutchez ]; then 54 echo -e "\nSystem already had NutchEz." 55 exit 56 else 57 echo -e "\nSystem does not has NutchEz." 58 fi 39 59 } 40 60 … … 177 197 expect eof" 178 198 else 179 echo " System already has nutchuser, create nutchuser and change password."199 echo "Create nutchuser and change password." 180 200 useradd -m nutchuser -s /bin/bash 181 201 expect -c "spawn passwd nutchuser
Note: See TracChangeset
for help on using the changeset viewer.