From: "J. Bruce Fields" <bfields@fieldses.org>
To: Steve Dickson <steved@redhat.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>,
Systemd Mailing List <systemd-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] start-statd: Use the canonical to check if systemd is running.
Date: Thu, 15 Jan 2015 14:36:07 -0500 [thread overview]
Message-ID: <20150115193607.GE15885@fieldses.org> (raw)
In-Reply-To: <1421181457-8159-4-git-send-email-steved@redhat.com>
On Tue, Jan 13, 2015 at 03:37:37PM -0500, Steve Dickson wrote:
> 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
In the case systemctl start fails it then falls back on
exec rpc.statd --no-notify
which is kind of unexpected. It's going to be confusing having this
hand-started statd on a systemd distro. Better just to fail cleanly.
So that "&& exit" should just be "; exit".
--b.
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-01-15 19:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 20:37 [PATCH 0/3] Miscellaneous systemd changes Steve Dickson
2015-01-13 20:37 ` [PATCH 1/3] systemd: Bind rpc.idmapd to the nfs-server service Steve Dickson
2015-01-14 9:46 ` [systemd-devel] " Michal Sekletar
2015-01-14 13:26 ` Steve Dickson
2015-01-13 20:37 ` [PATCH 2/3] systemd: Bind the nfs-mountd service " 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 [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-01-14 15:46 [PATCH 0/3] Miscellaneous systemd changes (v2) Steve Dickson
2015-01-14 15:46 ` [PATCH 3/3] start-statd: Use the canonical to check if systemd is running Steve Dickson
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=20150115193607.GE15885@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
--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