From: Neil Brown <neilb@suse.de>
To: Steve Dickson <SteveD@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 3/6] systemd: add nfs-utils_env.sh for SUSE.
Date: Thu, 20 Feb 2014 17:55:30 +1100 [thread overview]
Message-ID: <20140220065530.7320.38662.stgit@notabene.brown> (raw)
In-Reply-To: <20140220065345.7320.49992.stgit@notabene.brown>
This script provides the required translation for
sysconfig variables understood by init.d script on openSUSE.
Signed-off-by: NeilBrown <neilb@suse.de>
---
systemd/SUSE-nfs-utils_env.sh | 62 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
create mode 100644 systemd/SUSE-nfs-utils_env.sh
diff --git a/systemd/SUSE-nfs-utils_env.sh b/systemd/SUSE-nfs-utils_env.sh
new file mode 100644
index 000000000000..8d6d94ed29e5
--- /dev/null
+++ b/systemd/SUSE-nfs-utils_env.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# extract configuration from /etc/sysconfig/nfs-utils and write
+# environment to /run/sysconfig/nfs-utils to be used by systemd unit
+# files.
+# This script expect configuration as used by openSUSE-13.1 and later
+#
+
+nfs_config=/etc/sysconfig/nfs
+if test -r $nfs_config; then
+ . $nfs_config
+fi
+
+pipefs=
+if [ -n "$RPC_PIPEFS_DIR" -a "$RPC_PIPEFS_DIR" != "/var/lib/nfs/rpc_pipefs" ]; then
+ pipefs="-p /var/lib/nfs/rpc_pipefs"
+fi
+
+mountdport=
+if [ -n "$MOUNTD_PORT" ]; then
+ mountdport="-p $MOUNTD_PORT"
+fi
+
+case $NFS_GSSD_AVOID_DNS in
+ [Nn]*) ignore_dns=-D ;;
+ [Yy]*) ignore_dns= ;;
+ * ) ignore_dns=-D
+esac
+
+version_params=
+if [ "$NFS3_SERVER_SUPPORT" == "no" ]; then
+ version_params="--no-nfs-version 2 --no-nfs-version 3"
+fi
+if [ "$NFS4_SUPPORT" != "yes" ]; then
+ version_params="--no-nfs-version 4"
+fi
+if [ "$NFS4_SERVER_MINOR_VERSION" != "0" ]; then
+ version_params="$VERSION_PARAMS --nfs-version 4 --nfs-version 4.$NFS4_SERVER_MINOR_VERSION"
+fi
+
+if [ "$USE_KERNEL_NFSD_NUMBER" -gt 0 ]; then
+ threads=$USE_KERNEL_NFSD_NUMBER
+else
+ threads=3
+fi
+
+case $NFS_GSSD_AVOID_DNS in
+ [Nn]*) ignore_dns=-D ;;
+ [Yy]*) ignore_dns= ;;
+ * ) ignore_dns=-D
+esac
+
+mkdir -p /run/sysconfig
+{
+echo "RPCIDMAPDARGS=$pipefs"
+echo "RPCMOUNTDARGS=$mountdport $MOUNTD_OPTIONS $version_parms"
+echo "RPCNFSDARGS=$NFSD_OPTIONS $version_params $threads"
+echo "GSSDARGS=$ignore_dns $GSSD_OPTIONS $pipefs"
+echo "SMNOTIFYARGS=$SM_NOTIFY_OPTIONS"
+echo "STATDARGS=$STATD_OPTIONS"
+echo "SVCGSSDARGS=$SVCGSSD_OPTIONS"
+} > /run/sysconfig/nfs-utils
next prev parent reply other threads:[~2014-02-20 6:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 6:55 [nfs-utils/systemd PATCH 0/6] Assorted fixes for systemd units Neil Brown
2014-02-20 6:55 ` [PATCH 5/6] systemd: nfs-client needs rpc-svcgssd too Neil Brown
2014-02-20 6:55 ` [PATCH 6/6] systemd: add PIDFile directives where appropriate Neil Brown
2014-02-20 6:55 ` [PATCH 2/6] systemd units: create nfs-config.service as single location to process config Neil Brown
2014-03-22 21:24 ` Steve Dickson
2014-03-24 0:00 ` NeilBrown
2014-03-24 10:45 ` Steve Dickson
2014-02-20 6:55 ` [PATCH 4/6] systemd: remove @localstatedir@ marking Neil Brown
2014-02-20 6:55 ` [PATCH 1/6] systemd units: remove reference to nfs-server.target from nfs-server.service Neil Brown
2014-02-20 6:55 ` Neil Brown [this message]
2014-03-23 19:14 ` [PATCH 3/6] systemd: add nfs-utils_env.sh for SUSE Steve Dickson
2014-03-23 23:45 ` NeilBrown
2014-03-24 13:37 ` [nfs-utils/systemd PATCH 0/6] Assorted fixes for systemd units 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=20140220065530.7320.38662.stgit@notabene.brown \
--to=neilb@suse.de \
--cc=SteveD@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;
as well as URLs for NNTP newsgroup(s).