From: NeilBrown <neilb@suse.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: linux-nfs@vger.kernel.org, "J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 3/4] nfs-server-generator: avoid using syslog
Date: Wed, 21 Dec 2016 11:19:14 +1100 [thread overview]
Message-ID: <148227955410.31345.7715529128389692817.stgit@noble> (raw)
In-Reply-To: <148227940052.31345.1974080582264239934.stgit@noble>
nfs-server-generator is run very early when a lot of services
are not yet started, so it mustn't depend on them.
It already avoids using DNS, but it should avoid syslog too.
If it tries to log error to syslog, it can deadlock. So just let
messages go to stderr.
Signed-off-by: NeilBrown <neilb@suse.com>
---
systemd/nfs-server-generator.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/systemd/nfs-server-generator.c b/systemd/nfs-server-generator.c
index 7c40b3f29b99..cc99969e9922 100644
--- a/systemd/nfs-server-generator.c
+++ b/systemd/nfs-server-generator.c
@@ -95,6 +95,9 @@ int main(int argc, char *argv[])
FILE *f, *fstab;
struct mntent *mnt;
+ /* Avoid using any external services */
+ xlog_syslog(0);
+
if (argc != 4 || argv[1][0] != '/') {
fprintf(stderr, "nfs-server-generator: create systemd dependencies for nfs-server\n");
fprintf(stderr, "Usage: normal-dir early-dir late-dir\n");
next prev parent reply other threads:[~2016-12-21 0:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 0:19 [PATCH 0/4] Assorted nfs-utils patches NeilBrown
2016-12-21 0:19 ` [PATCH 1/4] nfsd: fix setting of minor version from config file NeilBrown
2016-12-21 0:19 ` [PATCH 4/4] mountd: delay reading etab until first request arrives NeilBrown
2016-12-22 20:35 ` J. Bruce Fields
2016-12-22 23:16 ` NeilBrown
2016-12-23 0:35 ` J. Bruce Fields
2016-12-21 0:19 ` [PATCH 2/4] nfsd: Do not permit manipulation of NFSv4.0, e.g. "-N 4.0" NeilBrown
2016-12-21 0:19 ` NeilBrown [this message]
2017-01-04 16:56 ` [PATCH 0/4] Assorted nfs-utils patches 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=148227955410.31345.7715529128389692817.stgit@noble \
--to=neilb@suse.com \
--cc=SteveD@redhat.com \
--cc=bfields@redhat.com \
--cc=linux-nfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox