From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Cc: Systemd Mailing List <systemd-devel@lists.freedesktop.org>
Subject: [PATCH 3/3] start-statd: Use the canonical to check if systemd is running.
Date: Wed, 14 Jan 2015 10:46:50 -0500 [thread overview]
Message-ID: <1421250410-7246-4-git-send-email-steved@redhat.com> (raw)
In-Reply-To: <1421250410-7246-1-git-send-email-steved@redhat.com>
Use the approved way, define in
http://www.freedesktop.org/software/systemd/man/sd_booted.html
to check if systemd is installed and running
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/statd/start-statd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/statd/start-statd b/utils/statd/start-statd
index ec9383b..b32b3a5 100755
--- a/utils/statd/start-statd
+++ b/utils/statd/start-statd
@@ -7,7 +7,7 @@
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
# First try systemd if it's installed.
-if systemctl --help >/dev/null 2>&1; then
+if test -d /run/systemd/system; then
# Quit only if the call worked.
systemctl start rpc-statd.service && exit
fi
--
2.1.0
next prev parent reply other threads:[~2015-01-14 15:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 15:46 [PATCH 0/3] Miscellaneous systemd changes (v2) Steve Dickson
2015-01-14 15:46 ` [PATCH 1/3] systemd: Bind rpc.idmapd to the nfs-server service Steve Dickson
2015-01-14 15:46 ` [PATCH 2/3] systemd: Bind the nfs-mountd service " Steve Dickson
2015-01-14 15:46 ` Steve Dickson [this message]
2015-01-15 11:20 ` [systemd-devel] [PATCH 0/3] Miscellaneous systemd changes (v2) Steve Dickson
-- strict thread matches above, loose matches on Subject: below --
2015-01-13 20:37 [PATCH 0/3] Miscellaneous systemd changes Steve Dickson
2015-01-13 20:37 ` [PATCH 3/3] start-statd: Use the canonical to check if systemd is running Steve Dickson
2015-01-15 19:36 ` J. Bruce Fields
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=1421250410-7246-4-git-send-email-steved@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=systemd-devel@lists.freedesktop.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