From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.openembedded.org (Postfix) with ESMTP id 99A566A641 for ; Wed, 29 May 2013 15:03:52 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.14.5/8.14.3) with ESMTP id r4TF3r1p016007 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 29 May 2013 08:03:53 -0700 (PDT) Received: from msp-mhatle-lx2.wrs.com (172.25.34.61) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.2.342.3; Wed, 29 May 2013 08:03:53 -0700 From: Mark Hatle To: Date: Wed, 29 May 2013 10:09:50 -0500 Message-ID: <1369840203-21898-9-git-send-email-mark.hatle@windriver.com> X-Mailer: git-send-email 1.8.1.2.545.g2f19ada In-Reply-To: <1369840203-21898-1-git-send-email-mark.hatle@windriver.com> References: <1369840203-21898-1-git-send-email-mark.hatle@windriver.com> MIME-Version: 1.0 X-Originating-IP: [172.25.34.61] Subject: [PATCH 8/21] initscripts: let status return 0 when proc is running well X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 May 2013 15:03:53 -0000 Content-Type: text/plain From: Jesse Zhang Ensure that the status returns 0 instead of the last shell command result, otherwise the calling script can not properly detect the status of pid. Signed-off-by: Jesse Zhang Signed-off-by: Robert Yang --- meta/recipes-core/initscripts/initscripts-1.0/functions | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-core/initscripts/initscripts-1.0/functions b/meta/recipes-core/initscripts/initscripts-1.0/functions index 944e3a5..8e15762 100644 --- a/meta/recipes-core/initscripts/initscripts-1.0/functions +++ b/meta/recipes-core/initscripts/initscripts-1.0/functions @@ -52,6 +52,7 @@ status() { pid=`pidofproc $1` if [ -n "$pid" ]; then echo "$1 (pid $pid) is running..." + return 0 else echo "$1 is stopped" fi -- 1.8.1.2.545.g2f19ada