From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6507C138CCF for ; Wed, 13 May 2015 21:56:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8CD40E0899; Wed, 13 May 2015 21:56:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3AD98E0899 for ; Wed, 13 May 2015 21:56:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3900A34084C for ; Wed, 13 May 2015 21:56:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D729F9CD for ; Wed, 13 May 2015 21:56:17 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1431553915.ddce529c71c2e9f01d8e5666e27050b6ed6c6761.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/s6.sh X-VCS-Directories: sh/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: ddce529c71c2e9f01d8e5666e27050b6ed6c6761 X-VCS-Branch: master Date: Wed, 13 May 2015 21:56:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e788e998-7bba-4553-bc43-f6ed94523bcf X-Archives-Hash: e85ffc93a0f297ebf289286561992a39 commit: ddce529c71c2e9f01d8e5666e27050b6ed6c6761 Author: William Hubbs gmail com> AuthorDate: Wed May 13 21:51:55 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed May 13 21:51:55 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=ddce529c More s6 fixes - When no service link is in the scan directory, show the default stopped message. - Do not remove the service link when stopping the service. sh/s6.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sh/s6.sh b/sh/s6.sh index 01527b6..a99fd5b 100644 --- a/sh/s6.sh +++ b/sh/s6.sh @@ -37,12 +37,16 @@ s6_stop() fi sleep 1.5 set -- $(s6-svstat "${s6_service_link}") - [ "$1" = "down" ] && rm -fr "${s6_service_link}" + [ "$1" = "down" ] eend $? "Failed to stop $RC_SVCNAME" } s6_status() { s6_service_link="${RC_SVCDIR}/s6-scan/${s6_service_path##*/}" - s6-svstat "${s6_service_link}" + if [ -L "${s6_service_link}" ]; then + s6-svstat "${s6_service_link}" + else + _status + fi }