From patchwork Wed Apr 15 15:39:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Oudinet X-Patchwork-Id: 461573 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id CB16314021A for ; Thu, 16 Apr 2015 01:40:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=DBIemoqG; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 01A6296EE7; Wed, 15 Apr 2015 15:40:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8KMbKRwgWQOc; Wed, 15 Apr 2015 15:40:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7B6E096EE4; Wed, 15 Apr 2015 15:40:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 366781C21FF for ; Wed, 15 Apr 2015 15:40:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 332BCA43ED for ; Wed, 15 Apr 2015 15:40:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VqS3mRyFsH8P for ; Wed, 15 Apr 2015 15:40:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 8F38FA43E8 for ; Wed, 15 Apr 2015 15:40:53 +0000 (UTC) Received: by widdi4 with SMTP id di4so159903313wid.0 for ; Wed, 15 Apr 2015 08:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8q/CM1AP7+LJi/CVJczD3IdGBODluM7ZDlSlmFShMAo=; b=DBIemoqGGA7tTfEf0B+HFj/UkwdULjfAeuyv8d6gE4zav/e2Fp4YfzvUI+IIFGA8yd awOQg1mE+2gPcDfIARWBnTdKT+wSfecTcuWLX45cmzVhpop+ITyJLFuprCkJka9VSNid LnnGWLlqVFaX6YjsNVoPJnDMVLPpO+xHVQnl/YolhKTYPKxYp9AurbKtTeR5sY/snKRx fCNnbm4DRK1qj4SFoazLdZtVgCVzJP71dCU87EyufOdlXvVJusUHhQqcXn9WUKkL/hZt +YTDCh4heiwrq2TqW/DjfLp/dg00DAj9qhjU+ZKBEeW+SsbA4yUzV/NhGezXwRhx7VIu Gv1Q== X-Received: by 10.194.77.180 with SMTP id t20mr51924118wjw.115.1429112452243; Wed, 15 Apr 2015 08:40:52 -0700 (PDT) Received: from localhost.localdomain ([193.51.194.209]) by mx.google.com with ESMTPSA id gy8sm7706026wib.13.2015.04.15.08.40.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Apr 2015 08:40:51 -0700 (PDT) From: Johan Oudinet To: buildroot@buildroot.org Date: Wed, 15 Apr 2015 17:39:07 +0200 Message-Id: <1429112347-17009-3-git-send-email-johan.oudinet@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1429112347-17009-1-git-send-email-johan.oudinet@gmail.com> References: <1429112347-17009-1-git-send-email-johan.oudinet@gmail.com> Subject: [Buildroot] [PATCH 3/3] ejabberd: wait until ejabberd is up and running X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" ejabberdctl start returns immediately even if ejabberd is not ready yet. Add a call to ejabberdctl started just after to wait until the status says ejabberd is up and running. Signed-off-by: Johan Oudinet --- package/ejabberd/S50ejabberd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd index a471078..ff38d92 100644 --- a/package/ejabberd/S50ejabberd +++ b/package/ejabberd/S50ejabberd @@ -25,6 +25,12 @@ case "$1" in mkrundir || exit 1 echo -n "Starting ejabberd... " ctl start --spool "$SPOOLDIR" + # Wait until ejabberd is up and running. + if ctl started; then + echo "done" + else + echo "failed" + fi ;; stop) echo -n "Stopping ejabberd... "