All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <oliva@gnu.org>
To: ceph-devel@vger.kernel.org
Subject: [PATCH] init: exec daemons or wrappers after setting up environment
Date: Wed, 30 Jul 2014 23:09:42 -0300	[thread overview]
Message-ID: <orzjfqth21.fsf@free.home> (raw)

Since with systemd we want to start daemons in foreground, adding an
exec before the daemon (or wrapper) name saves us a running shell just
waiting for the daemon to complete.  There's no reason to not do so
even when not using systemd, so, done...

Signed-off-by: Alexandre Oliva <oliva@gnu.org>
---
 src/init-ceph.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/init-ceph.in b/src/init-ceph.in
index 95723b0..cc3c3c7 100644
--- a/src/init-ceph.in
+++ b/src/init-ceph.in
@@ -277,9 +277,9 @@ for name in $what; do
 	    [ -n "$max_open_files" ] && files="ulimit -n $max_open_files;"
 
 	    if [ $SYSTEMD -eq 1 ]; then
-		cmd="systemd-run -r bash -c '$files $cmd --cluster $cluster -f'"
+		cmd="systemd-run -r bash -c '$files exec $cmd --cluster $cluster -f'"
 	    else
-		cmd="$files $wrap $cmd --cluster $cluster $runmode"
+		cmd="$files exec $wrap $cmd --cluster $cluster $runmode"
 	    fi
 
 	    if [ $dofsmount -eq 1 ] && [ -n "$fs_devs" ]; then

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer

                 reply	other threads:[~2014-07-31  2:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=orzjfqth21.fsf@free.home \
    --to=oliva@gnu.org \
    --cc=ceph-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.