Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1DADDDFC6 for ; Thu, 18 Oct 2012 16:12:04 +0000 (UTC) Received: (qmail 37052 invoked by uid 500); 18 Oct 2012 16:12:04 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 36857 invoked by uid 500); 18 Oct 2012 16:11:57 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 36804 invoked by uid 99); 18 Oct 2012 16:11:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2012 16:11:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2012 16:11:54 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F3E3623889D5 for ; Thu, 18 Oct 2012 16:11:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1399717 - /accumulo/branches/1.4/bin/start-server.sh Date: Thu, 18 Oct 2012 16:11:10 -0000 To: commits@accumulo.apache.org From: ecn@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121018161110.F3E3623889D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ecn Date: Thu Oct 18 16:11:10 2012 New Revision: 1399717 URL: http://svn.apache.org/viewvc?rev=1399717&view=rev Log: ACCUMULO-823 use alternatives to ipconfig Modified: accumulo/branches/1.4/bin/start-server.sh Modified: accumulo/branches/1.4/bin/start-server.sh URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/bin/start-server.sh?rev=1399717&r1=1399716&r2=1399717&view=diff ============================================================================== --- accumulo/branches/1.4/bin/start-server.sh (original) +++ accumulo/branches/1.4/bin/start-server.sh Thu Oct 18 16:11:10 2012 @@ -37,7 +37,16 @@ then fi SLAVES=`wc -l < ${ACCUMULO_HOME}/conf/slaves` -ip=`ifconfig | grep inet[^6] | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1` +IFCONFIG=/sbin/ifconfig +if [ ! -x $IFCONFIG ] +then + IFCONFIG='/bin/netstat -ie' +fi +ip=`$IFCONFIG 2>/dev/null| grep inet[^6] | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1` +if [ $? != 0 ] +then + ip=`python -c 'import socket as s; print s.gethostbyname(s.getfqdn())'` +fi if [ $HOST == localhost -o $HOST == "`hostname`" -o $HOST == "$ip" ] then