Index: nutchez-0.2/src/test/client_install_func.sh
===================================================================
--- nutchez-0.2/src/test/client_install_func.sh	(revision 157)
+++ nutchez-0.2/src/test/client_install_func.sh	(revision 159)
@@ -163,12 +163,12 @@
 # 此步驟若無法連到 master 則跳出
 function scp_master_nutchuser_sshkey(){
-echo -e "\n\033[31m= scp_master_nutchuser_sshkey (debug) =\033[0m"
-echo -e "mkdir -p /home/nutchuser/"
-mkdir -p /home/nutchuser/.ssh/
-rm -fr /home/nutchuser/.ssh/*
-
-unset Nutchuser_Passwd2
-
-echo -e "scp nutchuser@$1:~/.ssh /home/nutchuser/"
+  echo -e "\n\033[31m= scp_master_nutchuser_sshkey (debug) =\033[0m"
+  echo -e "mkdir -p /home/nutchuser/"
+  mkdir -p /home/nutchuser/.ssh/
+  rm -fr /home/nutchuser/.ssh/*
+
+  unset Nutchuser_Passwd2
+
+  echo -e "scp nutchuser@$1:~/.ssh /home/nutchuser/"
 expect -c "spawn scp -r -o StrictHostKeyChecking=no nutchuser@$1:~/.ssh /home/nutchuser/
 expect \"*: \" { send \"$Nutchuser_Passwd\r\" }
@@ -176,14 +176,13 @@
 expect eof"
 
-if [ -e "/home/nutchuser/.ssh/authorized_keys" ]; then
+  if [ -e "/home/nutchuser/.ssh/authorized_keys" ]; then
         echo -e "\nscp correct."    
     else
-        echo -e "\nscp is error,\n(1)plz check nutchuser password in server\n(2)nutchuser's authorized_keys in server\n(3)server's network status"
-        exit
+      echo -e "\nscp is error,\n(1)plz check nutchuser password in server\n(2)nutchuser's authorized_keys in server\n(3)server's network status"
+      exit
     fi
-
-    echo "chown -R nutchuser:nutchuser /home/nutchuser/.ssh"
-    chown -R nutchuser:nutchuser /home/nutchuser/.ssh
-
+  ssh-add /home/nutchuser/.ssh/id_rsa
+  echo "chown -R nutchuser:nutchuser /home/nutchuser/.ssh"
+  chown -R nutchuser:nutchuser /home/nutchuser/.ssh
 }
 
@@ -234,20 +233,19 @@
 # 目前僅需做到能無礙的複製遠端的/opt/nutchez/到local的/opt/
 function scp_packages(){
-echo -e "\n\033[31m= scp_packages (debug) =\033[0m"
-
-mkdir /opt/nutchez
-mkdir /var/nutchez
-mkdir /home/nutchuser/nutchez
-chmod 777 /opt/nutchez
-#su nutchuser -c "scp -r -o StrictHostKeyChecking=no nutchuser@$1:/opt/nutchez /opt/"
-echo "scp -r nutchuser@$1:/opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz /opt/nutchez/"
-su nutchuser -c "scp -r -o StrictHostKeyChecking=no nutchuser@$1:/opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz /opt/nutchez"
-
-echo -e "\nchown -R nutchuser:nutchuser /opt/nutchez"
-chown -R nutchuser:nutchuser /opt/nutchez
-chown -R nutchuser:nutchuser /var/nutchez
-chown -R nutchuser:nutchuser /home/nutchuser/nutchez
-
-chmod 755 /opt/nutchez
+  echo -e "\n\033[31m= scp_packages (debug) =\033[0m"
+  mkdir /opt/nutchez
+  mkdir /var/nutchez
+  mkdir /home/nutchuser/nutchez
+  mkdir /home/nutchuser/nutchez/source
+  chmod 777 /opt/nutchez
+  #su nutchuser -c "scp -r -o StrictHostKeyChecking=no nutchuser@$1:/opt/nutchez /opt/"
+  echo "scp -r nutchuser@$1:/opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz /opt/nutchez/"
+  su nutchuser -c "scp -r -o StrictHostKeyChecking=no nutchuser@$1:/home/nutchuser/nutchez/source/NutchezForClientOf_$Master_IP_Address.tar.gz /home/nutchuser/nutchez/source"
+
+  echo -e "\nchown -R nutchuser:nutchuser /opt/nutchez"
+  chown -R nutchuser:nutchuser /opt/nutchez
+  chown -R nutchuser:nutchuser /var/nutchez
+  chown -R nutchuser:nutchuser /home/nutchuser/nutchez
+  chmod 755 /opt/nutchez
 }
 
@@ -255,6 +253,6 @@
 function install_nutch_package(){
   echo -e "\n\033[31m= install_nutch_package (debug) =\033[0m"
-  tar -zxvf /opt/nutchez/NutchezForClientOf_$Master_IP_Address.tar.gz -C /
-  sed -i.bak '1a '$Master_IP_Address' '$Master_Hostname'' /etc/hosts
+  tar -zxvf /home/nutchuser/nutchez/source/NutchezForClientOf_$Master_IP_Address.tar.gz -C /opt/nutchez
+  sed -i '1a '$Master_IP_Address' '$Master_Hostname'' /etc/hosts
   #/opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode
   #/opt/nutchez/nutch/bin/hadoop-daemon.sh start tasktracker
@@ -270,7 +268,9 @@
 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)
+net_MacAddr=$(ifconfig $net_interfaces | grep 'HW' | sed 's/^.*HWaddr //g')
 echo "net_address is $net_address"
+echo "net_MacAddr is $net_MacAddr"
 
 # 若有多個 eth 時
@@ -289,14 +289,16 @@
         net_choice=1
     fi   
-    
+
     echo "choice is $net_choice"
     net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice)
-    ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1
+    # config $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"
-fi
-
-echo "ssh nutchuser@$1 echo $net_address $(hostname) \>\> ~/nutchez/nutch_nodes"
-su nutchuser -c "ssh nutchuser@$1 echo $net_address $(hostname) \>\> ~/nutchez/nutch_nodes"
+    echo "net_MacAddr is $net_MacAddr"
+fi
+
+echo "ssh nutchuser@$1 echo $net_address $(hostname) $net_MacAddr \>\> ~/nutchez/nutch_nodes"
+su nutchuser -c "ssh nutchuser@$1 echo $net_address $(hostname) $net_MacAddr \>\> ~/nutchez/nutch_nodes"
 
 #su nutchuser -c expect -c "spawn ssh nutchuser@$1
