Author: tchemineau
Date: 2010-09-23 11:00:41 +0200 (Thu, 23 Sep 2010)
New Revision: 132

Modified:
   openldap-mmr/trunk/functions
Log:
fix #278 - use full path to run ifconfig

Modified: openldap-mmr/trunk/functions
===================================================================
--- openldap-mmr/trunk/functions        2010-08-17 16:20:03 UTC (rev 131)
+++ openldap-mmr/trunk/functions        2010-09-23 09:00:41 UTC (rev 132)
@@ -308,11 +308,11 @@
 #
 get_local_ipAddresses ()
 {
-  net_interfaces="`ifconfig -s | grep -Eiv "^Iface" | grep -Eiv "^lo" \
+  net_interfaces="`/sbin/ifconfig -s | grep -Eiv "^Iface" | grep -Eiv "^lo" \
     | cut -d' ' -f 1 | perl -p0e 's/\n/ /g'`"
   ip_address_list=""
   for net_interface in ${net_interfaces}; do
-    ip_address=`ifconfig ${net_interface} | grep -Ei "inet (adr|addr):" \
+    ip_address=`/sbin/ifconfig ${net_interface} | grep -Ei "inet (adr|addr):" \
       | awk '{print $2}' | sed -e 's/adr://g;s/addr://g'`
     ip_address_list="${ip_address_list}${net_interface}:${ip_address};"
   done
@@ -454,7 +454,7 @@
 {
   ip_address=""
   while [ -z "${ip_address}" ]; do
-    echo -n " > Local IP address [${LDAP_NODE_IP}]: "
+    echo -n " > Local IP address (or hostname) [${LDAP_NODE_IP}]: "
     read ip_address
     if [ -z "${ip_address}" ]; then
       if [ -z "${LDAP_NODE_IP}" ]; then
@@ -463,10 +463,6 @@
       fi
       ip_address="${LDAP_NODE_IP}"
     fi
-    if [ `ifconfig | grep "${ip_address}" | wc -l` -ne 1 ]; then
-      ip_address=""
-      echo "   The IP address you provide is not found on your system."
-    fi
   done
   LDAP_NODE_IP="${ip_address}"
 }
@@ -495,7 +491,7 @@
 {
   ip_address=""
   while [ -z "${ip_address}" ]; do
-    echo -n " > IP address (or hostname) [${LDAP_PROVIDER_IP}]: "
+    echo -n " > Remote IP address (or hostname) [${LDAP_PROVIDER_IP}]: "
     read ip_address
     if [ -z "${ip_address}" ]; then
       if [ -z "${LDAP_PROVIDER_IP}" ]; then

_______________________________________________
ltb-changes mailing list
[email protected]
http://lists.ltb-project.org/listinfo/ltb-changes

Reply via email to