Index: nutchez-0.2/src/test/client_install_func.sh
===================================================================
--- nutchez-0.2/src/test/client_install_func.sh	(revision 148)
+++ nutchez-0.2/src/test/client_install_func.sh	(revision 149)
@@ -256,24 +256,37 @@
 echo -e "\n= recall_hostname_ip (debug) ="
 
-net_interfaces=$(ifconfig | grep eth | cut -d " " -f1)
-declare -i i=1
-echo -e "\nWhich network use for this machine: "
-
-for net in $net_interfaces
-    do
-        echo "($i) $net"
-        i=i+1
-    done
-
-read net_choice
-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
-net_address=$(ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1)
-#net_address=$(ifconfig eth"${net_choice}" | grep "inet addr:" | sed 's/^.*inet addr://g' | sed 's/Bcast.*$//g')
-
+net_interfaces=$(ifconfig | grep ^eth | cut -d " " -f1)
+net_nu=$(echo $net_interfaces | wc -w)
+
+# 若只有一個 eth　時
+if [ "$net_nu" == "1" ]; then
+
+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"
+
+# 若有多個 eth 時
+else
+    declare -i i=1
+    echo -e "\nSystem have multiple network device, which network use for this machine: "
+       
+    for net in $net_interfaces
+        do  
+            echo "($i)  $net  $(ifconfig $net | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1)"
+            i=i+1
+        done
+       
+        read -p "Plz choice(1/2/3...): " net_choice
+    if [ -z $net_choice ]; then
+        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
+    net_address=$(ifconfig $net_interface | grep "inet addr:" | sed 's/^.*inet addr://g' | cut -d " " -f1)
+    echo "net_address is $net_address"
+fi
+
 echo "ssh nutchuser@$1 echo $net_address $(hostname) \>\> ~/nutch_nodes"
 su nutchuser -c "ssh nutchuser@$1 echo $net_address $(hostname) \>\> ~/nutch_nodes"
