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 E71C410030 for ; Wed, 4 Dec 2013 03:01:52 +0000 (UTC) Received: (qmail 71458 invoked by uid 500); 4 Dec 2013 03:01:48 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 71294 invoked by uid 500); 4 Dec 2013 03:01:44 -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 71202 invoked by uid 99); 4 Dec 2013 03:01: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; Wed, 04 Dec 2013 03:01:43 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A343891C9C9; Wed, 4 Dec 2013 03:01:42 +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: Wed, 04 Dec 2013 03:01:44 -0000 Message-Id: <549f53ab6e504ac0ac8a11de1777183a@git.apache.org> In-Reply-To: <95b109867a4144b6bc9cb93c33109567@git.apache.org> References: <95b109867a4144b6bc9cb93c33109567@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5312aea5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5312aea5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5312aea5 Branch: refs/heads/1.6.0-SNAPSHOT Commit: 5312aea508e15df61e9a1f1e4c77b771e63a9a7d Parents: 8a34937 0817cdc Author: Josh Elser Authored: Tue Dec 3 21:57:53 2013 -0500 Committer: Josh Elser Committed: Tue Dec 3 21:57:53 2013 -0500 ---------------------------------------------------------------------- test/system/continuous/README | 8 ++- test/system/continuous/agitator.pl | 71 ++++++++++++++++---- .../system/continuous/continuous-env.sh.example | 3 +- test/system/continuous/magitator.pl | 2 +- test/system/continuous/start-agitator.sh | 14 +++- test/system/continuous/stop-agitator.sh | 8 ++- 6 files changed, 85 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5312aea5/test/system/continuous/start-agitator.sh ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5312aea5/test/system/continuous/stop-agitator.sh ---------------------------------------------------------------------- diff --cc test/system/continuous/stop-agitator.sh index 72d9980,8ce448e..aa132c2 --- a/test/system/continuous/stop-agitator.sh +++ b/test/system/continuous/stop-agitator.sh @@@ -15,19 -14,13 +14,24 @@@ # See the License for the specific language governing permissions and # limitations under the License. -CONTINUOUS_CONF_DIR=${CONTINUOUS_CONF_DIR:-$ACCUMULO_HOME/test/system/continuous/} +# 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="$( cd -P "$( dirname "${SOURCE}" )" && pwd )" +script=$( basename "${SOURCE}" ) +# Stop: Resolve Script Directory + +CONTINUOUS_CONF_DIR=${CONTINUOUS_CONF_DIR:-${bin}} . $CONTINUOUS_CONF_DIR/continuous-env.sh - pkill -f agitator.pl + # Try to use sudo when we wouldn't normally be able to kill the processes + if [[ ("`whoami`" != "root") && ("`whoami`" != $ACCUMULO_USER) ]]; then + sudo -u $ACCUMULO_USER pkill -f agitator.pl + else + pkill -f agitator.pl + fi