From: "Christian Ruppert" <idl0r@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: man/, sh/
Date: Tue, 17 Jan 2012 17:26:28 +0000 (UTC) [thread overview]
Message-ID: <9c0edc5c527de01cbe2dccbc7f1a2c571b6acc41.idl0r@gentoo> (raw)
commit: 9c0edc5c527de01cbe2dccbc7f1a2c571b6acc41
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 17 17:23:56 2012 +0000
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Tue Jan 17 17:25:44 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=9c0edc5c
Use the "--make-pidfile" when command_background is used
The start-stop-daemon "--make-pidfile" option is now used by default when using
command_background, this requires a pidfile to be specified.
Document command_background option.
Reported-by: Giampaolo Tomassoni <giampaolo <AT> tomassoni.biz>
X-Gentoo-Bug: 399165
X-Gentoo-Bug-URL: https://bugs.gentoo.org/399165
---
man/runscript.8 | 5 +++++
sh/runscript.sh.in | 6 +++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/man/runscript.8 b/man/runscript.8
index dbc0b7d..dd934c4 100644
--- a/man/runscript.8
+++ b/man/runscript.8
@@ -111,6 +111,11 @@ Daemon to start or stop via
if no start or stop function is defined by the service.
.It Ar command_args
List of arguments to pass to the daemon when starting.
+.It Ar command_background
+Set this to "true", "yes" or "1" (case-insensitive) to force the daemon into
+the background. This implies the "--make-pidfile" and "--pidfile" option of
+.Xr start-stop-daemon 8
+so the pidfile variable must be set.
.It Ar pidfile
Pidfile to use for the above defined command.
.It Ar name
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
index 470f04c..e042be6 100644
--- a/sh/runscript.sh.in
+++ b/sh/runscript.sh.in
@@ -124,7 +124,11 @@ start()
local _background=
ebegin "Starting ${name:-$RC_SVCNAME}"
if yesno "${command_background}"; then
- _background="--background --pidfile"
+ if [ -z "${pidfile}" ]; then
+ eend 1 "command_background option used but no pidfile specified"
+ return 1
+ fi
+ _background="--background --make-pidfile --pidfile"
fi
if yesno "$start_inactive"; then
local _inactive=false
next reply other threads:[~2012-01-17 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 17:26 Christian Ruppert [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-09-16 19:27 [gentoo-commits] proj/openrc:master commit in: man/, sh/ William Hubbs
2012-09-25 15:35 William Hubbs
2012-09-22 14:58 Christian Ruppert
2012-03-03 15:24 William Hubbs
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=9c0edc5c527de01cbe2dccbc7f1a2c571b6acc41.idl0r@gentoo \
--to=idl0r@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