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 3FC7F1110A for ; Sat, 14 Jun 2014 04:35:44 +0000 (UTC) Received: (qmail 24028 invoked by uid 500); 14 Jun 2014 04:35:43 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 23927 invoked by uid 500); 14 Jun 2014 04:35:43 -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 23865 invoked by uid 99); 14 Jun 2014 04:35:43 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jun 2014 04:35:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7630193486D; Sat, 14 Jun 2014 04:35:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Date: Sat, 14 Jun 2014 04:35:52 -0000 Message-Id: <5a6f4db7295748c3a6d8dded37d4ffa7@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [11/50] [abbrv] git commit: ACCUMULO-2891 check for masters file before grep 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/ACCUMULO-378 Commit: 1b170e8e5b416720ff67df85adfd2c2eac3ffab5 Parents: d50bb3a Author: Mike Drob Authored: Wed Jun 11 10:17:38 2014 -0400 Committer: Mike Drob 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