From patchwork Fri Nov 11 20:26:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03/12] contrib: Use /etc/sysconfig/fedfs for rpcfedfsd init script Date: Fri, 11 Nov 2011 10:26:26 -0000 From: Chuck Lever X-Patchwork-Id: 125283 Message-Id: <20111111202626.10717.44442.stgit@degas.1015granger.net> To: fedfs-utils-devel@oss.oracle.com 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 --- 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"