Index: nutchez-0.2/src/test/install_func.sh
===================================================================
--- nutchez-0.2/src/test/install_func.sh	(revision 204)
+++ nutchez-0.2/src/test/install_func.sh	(revision 206)
@@ -96,5 +96,5 @@
 function check_nez_installed(){
   debug_info "$check_nez_1"
-  if [ -d "opt/nutchez" ]; then
+  if [ -d "/opt/nutchez" ]; then
     show_info "$check_nez_2"
     exit
@@ -221,4 +221,43 @@
 }
 
+# 新增nutchuser 帳號時用 Nutchuser_Passwd 當密碼
+function creat_nutchuser_account(){
+  debug_info "$create_nutchuser_d1"
+  while [ "$Nutchuser_Passwd" != "$Nutchuser_Passwd2" ]
+  do
+      echo -e "\n"
+      read -sp "$create_nutchuser_1" Nutchuser_Passwd
+      echo 
+      read -sp "$create_nutchuser_2" Nutchuser_Passwd2
+      echo 
+        if [ "$Nutchuser_Passwd" == "$Nutchuser_Passwd2" ]; then
+          show_info "$create_nutchuser_3"
+        else
+          show_info "$create_nutchuser_4"
+        fi
+  done                                                                                                                         
+  unset Nutchuser_Passwd2
+
+  if [ $(cat /etc/passwd | grep nutchuser) ]; then
+    show_info "$create_nutchuser_s1"
+    expect -c "spawn passwd nutchuser
+    set timeout 1
+    expect \"*: \"
+    send \"$Nutchuser_Passwd\r\"
+    expect \"*: \"
+    send \"$Nutchuser_Passwd\r\"
+    expect eof"
+    else
+      show_info "$create_nutchuser_s2"
+      useradd -m nutchuser -s /bin/bash
+      expect -c "spawn passwd nutchuser
+      set timeout 1
+      expect \"*: \"
+      send \"$Nutchuser_Passwd\r\"
+      expect \"*: \"
+      send \"$Nutchuser_Passwd\r\"
+      expect eof"
+  fi
+}
 
 function select_eth () {
@@ -248,5 +287,5 @@
     fi
 
-    show_info "$select_eth_echo_3"
+    show_info "$select_eth_echo_3 $net_choice"
 #   show_info "Your choice is $net_choice"
     net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice)
@@ -255,7 +294,7 @@
     net_MacAddr=$(ifconfig $net_interface | grep 'HW' | sed 's/^.*HWaddr //g')
 
-    show_info "$select_eth_echo_4"
+    show_info "$select_eth_echo_4 $net_address"
 #   show_info "net_address is $net_address"
-    show_info "$select_eth_echo_5"
+    show_info "$select_eth_echo_5 $net_MacAddr"
 #   show_info "net_MacAddr is $net_MacAddr"
   fi
@@ -263,8 +302,11 @@
 
 
-#function show_master_info () {
+function show_master_info () {
+  show_info "$show_master_info_echo_1 $MasterIP_Address"
+  show_info "$show_master_info_echo_2 $net_MacAddr"
+
 #  show_info "The Master IP Address is $MasterIP_Address"
 #  show_info "The Master MacAddr is $net_MacAddr"
-#}
+}
 
 function make_ssh_key () {
@@ -305,27 +347,27 @@
 # 修改nutch-site.xml中-http.agent.url, http.agent.email
 function set_nutch-site () {
-  debug_info "$set_haoop_site_echo_1"
+  debug_info "$set_nutch_site_echo_1"
 # debug_info "set nutch-site.xml(begin...)"
   Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.url' | sed 's/:.*//g'`
-  debug_info "$set_haoop_site_echo_2"
+  debug_info "$set_nutch_site_echo_2"
 # debug_info "debug...http.agent.url line number = $Line_NO..."
   sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml
-  debug_info "$set_haoop_site_echo_3"
+  debug_info "$set_nutch_site_echo_3"
 # debug_info "debug...edit http.agent.url delete line $((Line_NO+1))..."
   sed -i ''$Line_NO'a <value>'$MasterIP_Address'</value>' $Nutch_HOME/conf/nutch-site.xml
-  debug_info "$set_haoop_site_echo_4"
+  debug_info "$set_nutch_site_echo_4"
 # debug_info "debug...edit http.agent.url done..."
 
   Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.email' | sed 's/:.*//g'`
-  debug_info "$set_haoop_site_echo_5"
+  debug_info "$set_nutch_site_echo_5"
 # debug_info "debug...http.agent.email line number = $Line_NO..."
 
   sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml
-  debug_info "$set_haoop_site_echo_6"
+  debug_info "$set_nutch_site_echo_6"
 # debug_info "debug...edit http.agent.email delete line $((Line_NO+1))..."
   sed -i ''$Line_NO'a <value>'$Admin_email'</value>' $Nutch_HOME/conf/nutch-site.xml
-  debug_info "$set_haoop_site_echo_7"
+  debug_info "$set_nutch_site_echo_7"
 # debug_info "debug...edit http.agent.email done..."
-  debug_info "$set_haoop_site_echo_8"
+  debug_info "$set_nutch_site_echo_8"
 # debug_info "set nutch-site.xml(done!)"
 }
@@ -353,7 +395,7 @@
 
 function Install_Nutch () {
-  debug_info "$install_Nutch_echo_1"
+  debug_info "$install_Nutch_echo_1 $MasterIP_Address "
 # debug_info "MasterIP_Address=$MasterIP_Address"
-  debug_info "$install_Nutch_echo_2"
+  debug_info "$install_Nutch_echo_2 $(hostname)"
 # debug_info "Master_Hostname=$(hostname)"
   su nutchuser -c "echo $net_address $(hostname) $net_MacAddr \>\> ~/nutchez/system/nutch_nodes"
@@ -393,5 +435,5 @@
 function client_PassMasterIPAddr_for_Remove () {
   cd $Start_PATH
-  Line_NO=`cat client_remove.sh grep -n '# Master IP here' | sed 's/:.*//g'`
+  Line_NO=`cat client_remove.sh | grep -n "# Master IP here" | sed 's/:.*//g'`
   sed -i ''$((Line_NO+1))'d' client_remove.sh
   sed -i ''$Line_NO'a Master_IP_Address='$MasterIP_Address'' client_remove.sh
@@ -425,9 +467,8 @@
 
   i=10
+  debug_info "$start_up_tomcat_echo_2"
   until [ $i -lt 1 ]
     do
       sleep 1s
-      debug_info "$start_up_tomcat_echo_2"
-#     debug_info "wait $i sec..."
       i=`expr $i - 1`
     done
