accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From md...@apache.org
Subject [1/3] git commit: ACCUMULO-2891 check for masters file before grep
Date Wed, 11 Jun 2014 15:52:55 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6.1-SNAPSHOT d50bb3a21 -> 1b170e8e5
  refs/heads/master 9fcaace81 -> 97cac218c


ACCUMULO-2891 check for masters file before grep

Check that file exists
Before we try to open it
Be one with all things


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

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: 1b170e8e5b416720ff67df85adfd2c2eac3ffab5
Parents: d50bb3a
Author: Mike Drob <mdrob@cloudera.com>
Authored: Wed Jun 11 10:17:38 2014 -0400
Committer: Mike Drob <mdrob@cloudera.com>
Committed: Wed Jun 11 11:52:35 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1b170e8e/bin/config.sh
----------------------------------------------------------------------
diff --git a/bin/config.sh b/bin/config.sh
index 931ec8b..7663473 100755
--- a/bin/config.sh
+++ b/bin/config.sh
@@ -115,7 +115,11 @@ then
 fi
 export HADOOP_PREFIX
 
-MASTER1=$(egrep -v '(^#|^\s*$)' "$ACCUMULO_CONF_DIR/masters" | head -1)
+unset MASTER1
+if [[ -f "$ACCUMULO_CONF_DIR/masters" ]]; then
+  MASTER1=$(egrep -v '(^#|^\s*$)' "$ACCUMULO_CONF_DIR/masters" | head -1)
+fi
+
 if [ -z "${MONITOR}" ] ; then
   MONITOR=$MASTER1
   if [ -f "$ACCUMULO_CONF_DIR/monitor" ]; then


Mime
View raw message