Index: /nutchez-0.2/src/test/install
===================================================================
--- /nutchez-0.2/src/test/install	(revision 157)
+++ /nutchez-0.2/src/test/install	(revision 158)
@@ -10,16 +10,7 @@
 # *.sh及nutchez-0.2-0531.tar.gz均在同一目錄下
 
-# 執行環境檢查
-check_info () {
-  check_root
-  check_systemInfo
-  check_nez_installed
-  check_sunJava
-  check_ssh
-  check_dialog
-  install_packages
-}
 
 main () {
+  #check_info
   echo "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號"
   set_install_information
@@ -40,4 +31,5 @@
     su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt"
     su nutchuser -c "mkdir /home/nutchuser/nutchez/search"
+    su nutchuser -c "mkdir /home/nutchuser/nutchez/source"
     make_client_install
 
@@ -55,4 +47,3 @@
 }
 
-check_info
 main
Index: /nutchez-0.2/src/test/install_func.sh
===================================================================
--- /nutchez-0.2/src/test/install_func.sh	(revision 157)
+++ /nutchez-0.2/src/test/install_func.sh	(revision 158)
@@ -13,4 +13,10 @@
 
 ####### fafa code here ###########
+
+
+# shell檔及壓縮檔在同一目錄中
+
+
+####### 環境變數section###########
 User_HOME=/home/nutchuser/nutchez
 NutchEZ_HOME=/opt/nutchez
@@ -18,20 +24,38 @@
 Tomcat_HOME=$NutchEZ_HOME/tomcat
 Index_DB=$User_HOME/search
-MasterIP_Address=`/sbin/ifconfig eth0 | grep 'inet addr' |  sed 's/^.*addr://g' | sed 's/Bcast.*$//g' | sed 's/ .*// '`
-
-# DNS暫時以IP取代
-MasterDNS=$MasterIP_Address
+Admin_email=nutchuser@nutch
+
+# $MasterIP_Address
+# $net_MacAddr
+
+######function section section#######
+
+
+function debug_echo () {
+  if [ $? -eq 0 ]; then
+    echo -e "\033[1;32;40m $1 \033[0m"
+  fi
+}
+
+
+check_info () {
+  check_root
+  check_systemInfo
+  check_nez_installed
+  check_sunJava
+  check_ssh
+  check_dialog
+  install_packages
+}
 
 function set_install_information () { 
   set_nutchuser_passwd
-  read -p "Please enter Administrator's e-mail address: " Admin_email
   select_eth
   MasterIP_Address=$net_address
-  # read -p "Please enter the Master DNS:  " MasterDNS
 }
 
 function set_nutchuser_passwd () {
-  read -p "Please enter nutchuser's password :  " nutchuser_passwd
-  read -p "Please enter nutchuser's password again:  " nutchuser_passwd_confirm
+  read -sp "Please enter nutchuser's password :  " nutchuser_passwd
+  read -sp "Please enter nutchuser's password again:  " nutchuser_passwd_confirm
   if [ $nutchuser_passwd != $nutchuser_passwd_confirm ]; then
     set_nutchuser_passwd
@@ -46,7 +70,9 @@
   # 若只有一個 eth　時
   if [ "$net_nu" == "1" ]; then
-    ifconfig $net_interfaces | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1
+    #ifconfig $net_interfaces | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1
     net_address=$(ifconfig $net_interfaces | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1)
-  #  echo "net_address is $net_address"
+    net_MacAddr=$(ifconfig $net_interfaces | grep 'HW' | sed 's/^.*HWaddr //g')
+    echo "net_address is $net_address"
+    echo "net_MacAddr is $net_MacAddr"
 
   # 若有多個 eth 時
@@ -70,5 +96,7 @@
     ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1
     net_address=$(ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1)
+    net_MacAddr=$(ifconfig $net_interfaces | grep 'HW' | sed 's/^.*HWaddr //g')
     echo "net_address is $net_address"
+    echo "net_MacAddr is $net_MacAddr"
   fi
 }
@@ -76,6 +104,5 @@
 
 function show_info () {
-  echo "Administrator's e-mail address is $Admin_email."
-  echo "The Master IP Address is: $MasterDNS"
+  echo "The Master IP Address is $MasterIP_Address"
 }
 
@@ -85,11 +112,14 @@
 
 function make_ssh_key () {
+  debug_echo "Make ssh key(begin...)"
   su nutchuser -c 'ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ""'
   su nutchuser -c "cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys"
+  su nutchuser -c "ssh-add /home/nutchuser/.ssh/id_rsa"
+  debug_echo "Make ssh key(done!)"
 }
 
 
 function set_haoop-site () {
-  echo "set $Nutch_HOME/conf/hadoop-site.xml"
+  debug_echo "set hadoop-site.xml(begin...)"
   cd $Nutch_HOME/conf/
   cat > hadoop-site.xml << EOF
@@ -109,32 +139,34 @@
 </configuration>
 EOF
+  debug_echo "set hadoop-site.xml(done!)"
 }
 
 # 修改nutch-site.xml中-http.agent.url, http.agent.email
 function set_nutch-site () {
-  echo "set $Nutch_HOME/conf/nutch-site.xml"
+  debug_echo "set nutch-site.xml(begin...)"
   Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.url' | sed 's/:.*//g'`
-  echo "debug...http.agent.url line number = $Line_NO..."
+  debug_echo "debug...http.agent.url line number = $Line_NO..."
   sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml
-  echo "debug...edit http.agent.url delete line $((Line_NO+1))..."
+  debug_echo "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
-  echo "debug...edit http.agent.url done..."
+  debug_echo "debug...edit http.agent.url done..."
 
   Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.email' | sed 's/:.*//g'`
-  echo "debug...http.agent.email line number = $Line_NO..."
+  debug_echo "debug...http.agent.email line number = $Line_NO..."
 
   sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml
-  echo "debug...edit http.agent.email delete line $((Line_NO+1))..."
+  debug_echo "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
-  echo "debug...edit http.agent.email done..."
+  debug_echo "debug...edit http.agent.email done..."
+  debug_echo "set nutch-site.xml(done!)"
 }
 
 function format_HDFS () {
-  echo "format HDFS..."
+  debug_echo "format HDFS..."
   su nutchuser -c "$Nutch_HOME/bin/hadoop namenode -format"
 }
 
 function start_up_NutchEZ (){
-  echo "start up NutchEZ..."
+  debug_echo "start up NutchEZ..."
   su nutchuser -c "$Nutch_HOME/bin/start-all.sh"
 }
@@ -148,21 +180,24 @@
 function client_PassMasterIPAddr () {
   Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'`
-  echo "debug...Master IP here line number = $Line_NO..."
+  debug_echo "debug...Master IP here line number = $Line_NO..."
   sed -i ''$((Line_NO+1))'d' client_install
-  echo "debug...edit Master IP at line $((Line_NO+1))..."
+  debug_echo "debug...edit Master IP at line $((Line_NO+1))..."
   sed -i ''$Line_NO'a Master_IP_Address='$MasterIP_Address'' client_install
-  echo "edit client_install done..."
+  debug_echo "edit client_install done..."
 }
 
 function client_PassMaster_Hostname () {
   Line_NO=`cat client_install | grep -n '# Master Hostname here' | sed 's/:.*//g'`
-  echo "debug...Master hostname here line number = $Line_NO..."
+  debug_echo "debug...Master hostname here line number = $Line_NO..."
   sed -i ''$((Line_NO+1))'d' client_install
-  echo "debug...edit Master Hostname at line $((Line_NO+1))..."
+  debug_echo "debug...edit Master Hostname at line $((Line_NO+1))..."
   sed -i ''$Line_NO'a Master_Hostname='$(hostname)'' client_install
-  echo "edit client_install done..."
+  debug_echo "edit client_install done..."
 }
 
 function make_client_install () {
+  # 建立資料夾(用來存放client的安奘檔)
+  su nutchuser -c "mkdir $User_HOME/source"
+
   # 將Master_IP_Address給client
   # 打包安裝目錄(不含tomcat)
@@ -170,14 +205,20 @@
   client_PassMasterIPAddr
   client_PassMaster_Hostname
-  su nutchuser -c "tar -cvzf /opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz  /home/nutchuser/nutchez/"
+  cd /opt/nutchez/
+  su nutchuser -c "tar -cvzf NutchezForClientOf_$Master_IP_Address.tar.gz  nutch"
+  
+  # 複製檔案至$User_HOME/source目錄下
+  mv NutchezForClientOf_$Master_IP_Address.tar.gz /home/nutchuser/nutchez/source
+  cp client_install client_install_func.sh /home/nutchuser/nutchez/source
 }
 
 function start_up_tomcat () {
-  echo "start up tomcat..."
+  debug_echo "start up tomcat..."
   sleep 10s
-  echo "su nutchuser -c "$Tomcat_HOME/bin/startup.sh""
   su nutchuser -c "$Tomcat_HOME/bin/startup.sh"
-}
-
+  debug_echo "tomcat has been started..."
+}
+
+###最後再整理###
 # client簡易步驟
 function client_install_command () {
