accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From md...@apache.org
Subject [2/6] git commit: Use $0 and readlink/dirname to determine distro root
Date Thu, 24 Oct 2013 02:45:27 GMT
Use $0 and readlink/dirname to determine distro root

Signed-off-by: Mike Drob <mdrob@mdrob.com>


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 7bf6148f2f19266ea3194be15d6ebb1f8a7d98a8
Parents: f975926
Author: Jeff Field <jfield@cloudera.com>
Authored: Wed Oct 9 15:00:00 2013 -0400
Committer: Mike Drob <mdrob@mdrob.com>
Committed: Wed Oct 23 22:42:14 2013 -0400

----------------------------------------------------------------------
 bin/etc_initd_accumulo | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7bf6148f/bin/etc_initd_accumulo
----------------------------------------------------------------------
diff --git a/bin/etc_initd_accumulo b/bin/etc_initd_accumulo
index ac0dfe0..929419b 100755
--- a/bin/etc_initd_accumulo
+++ b/bin/etc_initd_accumulo
@@ -24,10 +24,11 @@
 
 . /etc/rc.d/init.d/functions
 
-# let's assume this file is symlinked in from accumulo distro bin directory
-# otherwise reset the ACCUMULO_HOME setting
-pwd=`pwd -P`
-ACCUMULO_HOME=`cd $pwd/.. ; pwd -P`
+# Assuming the file is symlinked in from the distro bin directory, the
+# following should assign ACCUMULO_HOME the value of the directory that is
+# the distro root.
+
+ACCUMULO_HOME=$(dirname $(dirname $(readlink -f $0)))
 
 RETVAL=0
 case "$1" in


Mime
View raw message