public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: man/, sh/
Date: Fri, 16 Sep 2016 19:27:16 +0000 (UTC)	[thread overview]
Message-ID: <1474053789.c146b966913ae80652e3be925d3aba60ed82f14d.williamh@OpenRC> (raw)

commit:     c146b966913ae80652e3be925d3aba60ed82f14d
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Fri Sep 16 19:23:09 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Sep 16 19:23:09 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=c146b966

Add command_progress variable

If this is set to yes, 1, true, or on, start-stop-daemon will display a
progress meter while waiting for a daemon to stop.

 man/openrc-run.8        | 4 ++++
 sh/start-stop-daemon.sh | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/man/openrc-run.8 b/man/openrc-run.8
index 6e3b9dc..5ec8156 100644
--- a/man/openrc-run.8
+++ b/man/openrc-run.8
@@ -143,6 +143,10 @@ Set this to "true", "yes" or "1" (case-insensitive) if you want
 .Xr start-stop-daemon 8
 to force the daemon into the background. This forces the
 "--make-pidfile" and "--pidfile" options, so the pidfile variable must be set.
+.It Ar command_progress
+Set this to "true", "yes" or "1" (case-insensitive) if you want 
+.Xr start-stop-daemon 8
+to display a progress meter when waiting for a daemon to stop.
 .It Ar command_user
 If the daemon does not support changing to a different user id, you can
 use this to change the user id before

diff --git a/sh/start-stop-daemon.sh b/sh/start-stop-daemon.sh
index 6b679ac..6f396b3 100644
--- a/sh/start-stop-daemon.sh
+++ b/sh/start-stop-daemon.sh
@@ -63,6 +63,7 @@ ssd_start()
 
 ssd_stop()
 {
+	local _progress=
 	local startcommand="$(service_get_value "command")"
 	local startchroot="$(service_get_value "chroot")"
 	local startpidfile="$(service_get_value "pidfile")"
@@ -72,13 +73,15 @@ ssd_stop()
 	pidfile="${startpidfile:-$pidfile}"
 	procname="${startprocname:-$procname}"
 	[ -n "$command" -o -n "$procname" -o -n "$pidfile" ] || return 0
+	yesno "${command_progress}" && _progress=--progress
 	ebegin "Stopping ${name:-$RC_SVCNAME}"
 	start-stop-daemon --stop \
 		${retry:+--retry} $retry \
 		${command:+--exec} $command \
 		${procname:+--name} $procname \
 		${pidfile:+--pidfile} $chroot$pidfile \
-		${stopsig:+--signal} $stopsig
+		${stopsig:+--signal} $stopsig \
+		${_progress}
 
 	eend $? "Failed to stop ${name:-$RC_SVCNAME}"
 }


             reply	other threads:[~2016-09-16 19:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 19:27 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-09-25 15:35 [gentoo-commits] proj/openrc:master commit in: man/, sh/ William Hubbs
2012-09-22 14:58 Christian Ruppert
2012-03-03 15:24 William Hubbs
2012-01-17 17:26 Christian Ruppert
2011-12-31  1:42 Christian Ruppert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474053789.c146b966913ae80652e3be925d3aba60ed82f14d.williamh@OpenRC \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox