[fedfs-utils] [PATCH 03/12] contrib: Use /etc/sysconfig/fedfs for rpcfedfsd init script

Chuck Lever chuck.lever at oracle.com
Fri Nov 11 12:26:26 PST 2011


Commit 612e51b9 introduces a SysV-style init script for starting
rpc.fedfsd.  Like other NFS-related init scripts, it looks in
/etc/sysconfig/nfs for configuration information such as daemon
command line options.

Jeff Layton notes, however, that /etc/sysconfig/nfs is shipped
as part of the nfs-utils package.  To avoid an unwanted dependency on
nfs-utils, "we really want a separate file here.  /etc/sysconfig/fedfs
would be more appropriate," he says.  FedFS is supposed to be
independent of underlying file system protocols, after all.

Introduce a sample /etc/sysconfig/fedfs file in contrib, and update
the rpcfedfsd script to use it.

Signed-off-by: Chuck Lever <chuck.lever at oracle.com>
---

 contrib/init-scripts/Makefile.am |    2 +-
 contrib/init-scripts/fedfs       |   11 +++++++++++
 contrib/init-scripts/rpcfedfsd   |    2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 contrib/init-scripts/fedfs

diff --git a/contrib/init-scripts/Makefile.am b/contrib/init-scripts/Makefile.am
index a168a65..d1f35a5 100644
--- a/contrib/init-scripts/Makefile.am
+++ b/contrib/init-scripts/Makefile.am
@@ -23,7 +23,7 @@
 ##	http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 ##
 
-EXTRA_DIST		= rpcfedfsd
+EXTRA_DIST		= fedfs rpcfedfsd
 
 CLEANFILES		= cscope.in.out cscope.out cscope.po.out *~
 DISTCLEANFILES		= Makefile.in
diff --git a/contrib/init-scripts/fedfs b/contrib/init-scripts/fedfs
new file mode 100644
index 0000000..aa40100
--- /dev/null
+++ b/contrib/init-scripts/fedfs
@@ -0,0 +1,11 @@
+# /etc/sysconfig/fedfs
+#
+# This configuration file controls the behavior of the rpc.fedfsd
+# daemon, part of the fedfs-utils package.  For the vast majority
+# of users, there shouldn't be any need to alter the contents of
+# this file at all.
+
+#
+# Optional arguments passed to rpc.fedfsd.  See rpc.fedfsd(8)
+#
+#RPCFEDFSDARGS="--debug --uid 501 --gid 501 --port 45678"
diff --git a/contrib/init-scripts/rpcfedfsd b/contrib/init-scripts/rpcfedfsd
index d2bb7fe..0fcbe96 100755
--- a/contrib/init-scripts/rpcfedfsd
+++ b/contrib/init-scripts/rpcfedfsd
@@ -43,7 +43,7 @@
 [ -f /etc/sysconfig/network ] &&  . /etc/sysconfig/network
 
 # Check for, and source, configuration file; otherwise set defaults
-[ -f /etc/sysconfig/nfs ] && . /etc/sysconfig/nfs
+[ -f /etc/sysconfig/fedfs ] && . /etc/sysconfig/fedfs
 
 RETVAL=0
 prog="rpc.fedfsd"




More information about the fedfs-utils-devel mailing list