You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2013/12/20 17:10:42 UTC

[08/12] git commit: Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/30938af5
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/30938af5
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/30938af5

Branch: refs/heads/master
Commit: 30938af5f4d6523f7f0f7420fc65154074ead4bc
Parents: 6c96687 36f503c
Author: Josh Elser <el...@apache.org>
Authored: Fri Dec 20 00:55:32 2013 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Fri Dec 20 00:55:32 2013 -0500

----------------------------------------------------------------------
 bin/config.sh | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/30938af5/bin/config.sh
----------------------------------------------------------------------
diff --cc bin/config.sh
index 16a566b,665777e..07b7487
--- a/bin/config.sh
+++ b/bin/config.sh
@@@ -37,24 -37,32 +37,29 @@@
  # Values always set by script.
  #  SSH                Default ssh parameters used to start daemons
  #  MALLOC_ARENA_MAX   To work around a memory management bug (see ACCUMULO-847)
 +#  HADOOP_HOME        Home dir for hadoop.  TODO fix this.
  
  if [ -z "${ACCUMULO_HOME}" ] ; then
 -  this="$0"
 -  while [ -h "$this" ]; do
 -      ls=`ls -ld "$this"`
 -      link=`expr "$ls" : '.*-> \(.*\)$'`
 -      if expr "$link" : '.*/.*' > /dev/null; then
 -          this="$link"
 -      else
 -          this=`dirname "$this"`/"$link"
 -      fi
 +  # Start: Resolve Script Directory
 +  SOURCE="${BASH_SOURCE[0]}"
 +  while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
 +     bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 +     SOURCE="$(readlink "$SOURCE")"
 +     [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
    done
 -  bin=`dirname "$this"`
 -  script=`basename "$this"`
 -  bin=`cd "$bin"; pwd`
 -  this="$bin/$script"
 +  bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 +  script=$( basename "$SOURCE" )
 +  # Stop: Resolve Script Directory
  
 -  ACCUMULO_HOME=`dirname "$this"`/..
 -  export ACCUMULO_HOME=`cd $ACCUMULO_HOME; pwd`
 +  ACCUMULO_HOME=$( cd -P ${bin}/.. && pwd )
 +  export ACCUMULO_HOME
  fi
  
+ if [ ! -d "${ACCUMULO_HOME}" ]; then
+   echo "ACCUMULO_HOME=${ACCUMULO_HOME} is not a valid directory. Please make sure it exists"
+   exit 1
+ fi
+ 
  ACCUMULO_CONF_DIR="${ACCUMULO_CONF_DIR:-$ACCUMULO_HOME/conf}"
  export ACCUMULO_CONF_DIR
  if [ -z "$ACCUMULO_CONF_DIR" -o ! -d "$ACCUMULO_CONF_DIR" ]