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 9E65E13826C for ; Tue, 24 May 2016 16:43:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6253C141F9; Tue, 24 May 2016 16:43:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EC771141F9 for ; Tue, 24 May 2016 16:43:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 06A57340948 for ; Tue, 24 May 2016 16:43:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1D9AA336 for ; Tue, 24 May 2016 16:43:25 +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: <1463698694.a8214af2fe3aa91930e3270af99cf1d9b7ef5b0a.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/start-stop-daemon.sh X-VCS-Directories: sh/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: a8214af2fe3aa91930e3270af99cf1d9b7ef5b0a X-VCS-Branch: master Date: Tue, 24 May 2016 16:43:25 +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: 758aaafe-fe36-436e-a1d0-d95f940c5d4a X-Archives-Hash: 0c2b8fc3ab3bb037d774666e9e69f9e3 commit: a8214af2fe3aa91930e3270af99cf1d9b7ef5b0a Author: William Hubbs gmail com> AuthorDate: Thu May 19 22:58:14 2016 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu May 19 22:58:14 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=a8214af2 start-stop-daemon.sh: fix regression in chroot support The support for the chroot variable was broken in 0.16, this fixes that breakage. sh/start-stop-daemon.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sh/start-stop-daemon.sh b/sh/start-stop-daemon.sh index 3e42137..65ee660 100644 --- a/sh/start-stop-daemon.sh +++ b/sh/start-stop-daemon.sh @@ -40,6 +40,7 @@ ssd_start() fi eval start-stop-daemon --start \ --exec $command \ + ${chroot:+--chroot} $chroot \ ${procname:+--name} $procname \ ${pidfile:+--pidfile} $pidfile \ ${command_user+--user} $command_user \ @@ -47,6 +48,7 @@ ssd_start() -- $command_args $command_args_background if eend $? "Failed to start $RC_SVCNAME"; then service_set_value "command" "${command}" + [ -n "${chroot}" ] && service_set_value "chroot" "${chroot}" [ -n "${pidfile}" ] && service_set_value "pidfile" "${pidfile}" [ -n "${procname}" ] && service_set_value "procname" "${procname}" return 0 @@ -62,9 +64,11 @@ ssd_start() ssd_stop() { local startcommand="$(service_get_value "command")" + local startchroot="$(service_get_value "chroot")" local startpidfile="$(service_get_value "pidfile")" local startprocname="$(service_get_value "procname")" command="${startcommand:-$command}" + chroot="${startchroot:-$chroot}" pidfile="${startpidfile:-$pidfile}" procname="${startprocname:-$procname}" [ -n "$command" -o -n "$procname" -o -n "$pidfile" ] || return 0 @@ -73,7 +77,7 @@ ssd_stop() ${retry:+--retry} $retry \ ${command:+--exec} $command \ ${procname:+--name} $procname \ - ${pidfile:+--pidfile} $pidfile \ + ${pidfile:+--pidfile} $chroot$pidfile \ ${stopsig:+--signal} $stopsig eend $? "Failed to stop $RC_SVCNAME"