Index: nutchez-0.2/src/test/client_install.sh
===================================================================
--- nutchez-0.2/src/test/client_install.sh	(revision 121)
+++ nutchez-0.2/src/test/client_install.sh	(revision 122)
@@ -1,3 +1,13 @@
 #!/bin/bash
+# Program:
+#   Check root identity and change root to exectue client_install.sh
+# Author: 
+#   Waue, Shunfa, Rock {waue, shunfa, rock}@nchc.org.tw
+# History:
+#   2010/05/20  Rock    First release
+
+
+# 設定 functions 
+. ./client_install_func.sh
 
 # 需要master_install 設定的參數區
@@ -16,37 +26,41 @@
 # 檢查執行這個程式的是否為root權限
 check_root
+read
 
-# 查出此主機的作業系統,以及版本
+# 查出此主機的作業系統,以及版本，後面 read 在正式版後會拿掉 (用來trace 用)
 check_systemInfo
+read
 
 # 檢查之前是否有安裝NutchEz
 # 目前先檢查是否有/opt/nutchez 這個資料夾即可
 check_nez_installed
+read
 
 # 檢查是否有安裝sun java ,並檢查是否為jdk 1.6 以上版本
 check_sunJava
+read
 
 # 檢查是否有安裝openssh, openssh-server
-check_ssh
+#check_ssh
 
 # 檢查是否有安裝cdialog
-check_dialog
+#check_dialog
 
 # 檢查是否安裝 php 5.5
-check_php
+#check_php
 
 # scp nutchuser@master_ip:~ 把.ssh/目錄複製下來
 # 當使用者輸入nutchuser 密碼時，將此密碼紀錄到Nutchuser_Passwd
 # 此步驟若無法連到 master 則跳出
-scp_master_nutchuser_sshkey
+#scp_master_nutchuser_sshkey
 
 # 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼
-creat_nutchuser_account
+#creat_nutchuser_account
 
 # 用scp 複製 master 的設定與安裝資料
 # 目前僅需做到能無礙的複製遠端的/opt/nutchez/到local的/opt/
-scp_packages
+#scp_packages
 
 # 安裝
-install_packages
+#install_packages
 
Index: nutchez-0.2/src/test/client_install_func.sh
===================================================================
--- nutchez-0.2/src/test/client_install_func.sh	(revision 122)
+++ nutchez-0.2/src/test/client_install_func.sh	(revision 122)
@@ -0,0 +1,70 @@
+#!/bin/bash
+# Program:
+#   Functions for client_install.sh
+# Author: 
+#   Waue, Shunfa, Rock {waue, shunfa, rock}@nchc.org.tw
+# History:
+#   2010/05/20  Rock    First release(0.1)
+
+function check_root(){
+echo -e "\n= check_root ="
+if [ $USER != "root" ]; then
+    echo -e "\nPlz Change root to execute it!!!"
+    exit
+fi
+}
+
+
+
+# 查出此主機的作業系統,以及版本
+function check_systemInfo(){
+echo -e "\n= check_systemInfo ="
+echo -e "\nYour system information are:"
+lsb_release -a 2>/dev/null 
+}
+
+
+# 檢查之前是否有安裝NutchEz
+# 目前先檢查是否有/opt/nutchez 這個資料夾即可
+function check_nez_installed(){
+    echo -e "\n= chcheck_nez_installed ="
+    test -d /opt/nutchez && echo -e "\nYour system already had NutchEz." || \
+    echo -e "\nYour system does not has NutchEz."
+}
+
+
+# 檢查是否有安裝sun java ,並檢查是否為jdk 1.6 以上版本
+# 4種判斷可能性 (1)系統沒安裝 JAVA (2)系統有安裝JAVA，但非sun版本 
+# (3)系統有安裝但Sun Java 在非預設路徑下 (4)以正確安裝 Sun JAVA 預設路徑下
+function check_sunJava(){
+echo -e "\n= check_sunJava ="
+echo -e "\nNutchEz need Sun Java JDK 1.6.x or above version"
+javaPath="/usr/"
+
+test -e $javaPath/bin/java || read -p "Plz input your specific Java path\
+(ex./opt/jvm/java-6-sun-1.6.0.20/): " javaPath
+
+if [ -e $javaPath/bin/java ]; then
+    JAVA_org=$($javaPath/bin/java -version 2>&1 | grep "Java(TM)")
+    JAVA_version=$($javaPath/bin/java -version 2>&1 | grep "java version" | \
+    awk '{print $3}' | cut -d "." -f1-2 | cut -d "\"" -f2)
+
+    if [ "$JAVA_org" == "" ]; then 
+        echo "Your Java is not Sun version, plz install sun Java 1.6.X"
+        exit    
+    fi
+    
+    if [ $JAVA_version -lt "1.6" ]; then
+        echo "Your Java version is too old (it need 1.6.X above)"
+        exit
+    fi
+
+else
+    echo "Plz install Sun JAVA 1.6.X or above version"
+    exit
+fi
+
+unset JAVA_org
+unset JAVA_version
+
+}
Index: nutchez-0.2/src/test/client_start
===================================================================
--- nutchez-0.2/src/test/client_start	(revision 121)
+++ 	(revision )
@@ -1,17 +1,0 @@
-#!/bin/bash
-# Program:
-#   Check root identity and change root to exectue client_install.sh
-# Author: 
-#   Waue, Shunfa, Rock {waue, shunfa, rock}@nchc.org.tw
-# History:
-#   2010/05/20  Rock    First release
-
-
-if [ $USER != "root" ]; then
-    echo -e "\nChange root to execute, plz input root password!"
-    su -c ./client_install.sh
-else
-    echo -e "\nStart to..."
-    ./client_install.sh
-fi
-
