From patchwork Fri Nov 11 20:26:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 125284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "rcsinet15.oracle.com", Issuer "VeriSign Class 3 International Server CA - G3" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id EF48D1007D8 for ; Sat, 12 Nov 2011 07:26:52 +1100 (EST) Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pABKQmij006239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 11 Nov 2011 20:26:49 GMT Received: from oss.oracle.com (oss.oracle.com [141.146.12.120]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pABKQlJU025820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Nov 2011 20:26:48 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1ROxgQ-00076r-Ft; Fri, 11 Nov 2011 12:26:42 -0800 Received: from acsinet13.oracle.com ([141.146.126.235]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1ROxgN-00076k-Fh for fedfs-utils-devel@oss.oracle.com; Fri, 11 Nov 2011 12:26:39 -0800 Received: from mail-iy0-f171.google.com (mail-iy0-f171.google.com [209.85.210.171]) by acsinet13.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pABKQ3Ds003474 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 11 Nov 2011 20:26:39 GMT Received: by mail-iy0-f171.google.com with SMTP id y12so1680288iab.2 for ; Fri, 11 Nov 2011 12:26:38 -0800 (PST) Received: by 10.42.151.4 with SMTP id c4mr13763032icw.39.1321043196676; Fri, 11 Nov 2011 12:26:36 -0800 (PST) Received: from degas.1015granger.net ([99.26.161.222]) by mx.google.com with ESMTPS id z10sm17364273ibv.9.2011.11.11.12.26.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Nov 2011 12:26:36 -0800 (PST) From: Chuck Lever To: fedfs-utils-devel@oss.oracle.com Date: Fri, 11 Nov 2011 15:26:35 -0500 Message-ID: <20111111202635.10717.12928.stgit@degas.1015granger.net> In-Reply-To: <20111111202105.10717.28436.stgit@degas.1015granger.net> References: <20111111202105.10717.28436.stgit@degas.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Flow-Control-Info: class=ISPs ip=209.85.210.171 ct-class=G1 ct-vol1=0 ct-vol2=0 ct-vol3=0 ct-risk=0 ct-spam1=0 ct-spam2=0 ct-bulk=0 rcpts=1 size=11774 Subject: [fedfs-utils] [PATCH 04/12] contrib: Rename contrib/init-scripts X-BeenThere: fedfs-utils-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list Reply-To: fedfs-utils Developers List-Id: fedfs-utils Developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: fedfs-utils-devel-bounces@oss.oracle.com Errors-To: fedfs-utils-devel-bounces@oss.oracle.com X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-CT-RefId: str=0001.0A090209.4EBD8509.0109:SCFSTAT3865452, ss=1, re=-6.300, fgs=0 The contrib/init-scripts directory no longer contains only scripts. Use a more generic name for it. Signed-off-by: Chuck Lever --- configure.ac | 2 - contrib/Makefile.am | 2 - contrib/init-scripts/Makefile.am | 29 --------- contrib/init-scripts/fedfs | 11 --- contrib/init-scripts/rpcfedfsd | 121 -------------------------------------- contrib/init/Makefile.am | 29 +++++++++ contrib/init/fedfs | 11 +++ contrib/init/rpcfedfsd | 121 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 163 insertions(+), 163 deletions(-) delete mode 100644 contrib/init-scripts/Makefile.am delete mode 100644 contrib/init-scripts/fedfs delete mode 100755 contrib/init-scripts/rpcfedfsd create mode 100644 contrib/init/Makefile.am create mode 100644 contrib/init/fedfs create mode 100755 contrib/init/rpcfedfsd diff --git a/configure.ac b/configure.ac index 3a4316e..2a2052f 100644 --- a/configure.ac +++ b/configure.ac @@ -149,7 +149,7 @@ AC_SUBST([root_sbindir]) AC_CONFIG_FILES([Makefile contrib/Makefile - contrib/init-scripts/Makefile + contrib/init/Makefile doc/Makefile doc/ldap/Makefile doc/man/Makefile diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 7d68051..ee19f6b 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -23,7 +23,7 @@ ## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt ## -SUBDIRS = init-scripts +SUBDIRS = init CLEANFILES = cscope.in.out cscope.out cscope.po.out *~ DISTCLEANFILES = Makefile.in diff --git a/contrib/init-scripts/Makefile.am b/contrib/init-scripts/Makefile.am deleted file mode 100644 index d1f35a5..0000000 --- a/contrib/init-scripts/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -## -## @file contrib/init-scripts/Makefile.am -## @brief Process this file with automake to produce contrib/init-scripts/Makefile.in -## - -## -## Copyright 2011 Oracle. All rights reserved. -## -## This file is part of fedfs-utils. -## -## fedfs-utils is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License version 2.0 as -## published by the Free Software Foundation. -## -## fedfs-utils is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License version 2.0 for more details. -## -## You should have received a copy of the GNU General Public License -## version 2.0 along with fedfs-utils. If not, see: -## -## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt -## - -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 deleted file mode 100644 index aa40100..0000000 --- a/contrib/init-scripts/fedfs +++ /dev/null @@ -1,11 +0,0 @@ -# /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 deleted file mode 100755 index 0fcbe96..0000000 --- a/contrib/init-scripts/rpcfedfsd +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash -# -# rpcfedfsd Start up and shut down FedFS admin service -# -# chkconfig: 345 19 83 -# description: Starts user-level daemon for NFSv4 that handles \ -# FedFS administrative requests - -### BEGIN INIT INFO -# Provides: rpcfedfsd -# Required-Start: $network $syslog -# Required-Stop: $network $syslog -# Default-Start: 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Starts the NFSv4 fedfsd daemon -# Description: NFS is a popular protocol for file sharing across \ -# networks. This daemon processes FedFS administrative \ -# requests on NFSv4 exports. -### END INIT INFO - -## -## Copyright 2011 Oracle. All rights reserved. -## -## rpcfedfsd is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License version 2.0 as -## published by the Free Software Foundation. -## -## rpcfedfsd is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License version 2.0 for more details. -## -## A copy of the GNU General Public License version 2.0 is -## available here: -## -## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt -## - -# Source function library. -. /etc/init.d/functions - -# Source networking configuration. -[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network - -# Check for, and source, configuration file; otherwise set defaults -[ -f /etc/sysconfig/fedfs ] && . /etc/sysconfig/fedfs - -RETVAL=0 -prog="rpc.fedfsd" -LOCKFILE=/var/lock/subsys/$prog -uid=`id | cut -d\( -f1 | cut -d= -f2` - -case "$1" in - start|condstart) - # Check that networking is up. - [ "${NETWORKING}" != "yes" ] && exit 6 - - [ ! -x /usr/sbin/rpc.fedfsd ] && exit 5 - - # Only root can start the service - [ $uid -ne 0 ] && exit 4 - - # Make sure the daemon is not already running. - [ "$1" = "condstart" -a -n "`pidofproc $prog`" ] && { - killproc $prog "-SIGHUP" > /dev/null - exit 0 - } - [ "$1" = "start" ] && { - if status $prog > /dev/null ; then - exit 0 - fi - } - rm -f $LOCKFILE - - echo -n $"Starting RPC fedfsd: " - - # Start daemon. - daemon $prog ${RPCFEDFSDARGS} - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch $LOCKFILE - ;; - stop) - # Only root can stop the service - [ $uid -ne 0 ] && exit 4 - - # Stop daemon. - echo -n $"Stopping RPC fedfsd: " - killproc $prog - RETVAL=$? - echo - rm -f $LOCKFILE - ;; - status) - status rpc.fedfsd - RETVAL=$? - ;; - restart|reload|force-reload) - $0 stop - $0 start - RETVAL=$? - ;; - condrestart|try-restart) - if [ -f $LOCKFILE ]; then - $0 restart - RETVAL=$? - fi - ;; - condstop) - if [ -f $LOCKFILE ]; then - $0 stop - RETVAL=$? - fi - ;; - *) - echo $"Usage: $0 {start|stop|restart|force-reload|condstart|condrestart|try-restart|status|condstop}" - RETVAL=2 - ;; -esac - -exit $RETVAL diff --git a/contrib/init/Makefile.am b/contrib/init/Makefile.am new file mode 100644 index 0000000..537b478 --- /dev/null +++ b/contrib/init/Makefile.am @@ -0,0 +1,29 @@ +## +## @file contrib/init/Makefile.am +## @brief Process this file with automake to produce contrib/init/Makefile.in +## + +## +## Copyright 2011 Oracle. All rights reserved. +## +## This file is part of fedfs-utils. +## +## fedfs-utils is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License version 2.0 as +## published by the Free Software Foundation. +## +## fedfs-utils is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License version 2.0 for more details. +## +## You should have received a copy of the GNU General Public License +## version 2.0 along with fedfs-utils. If not, see: +## +## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +## + +EXTRA_DIST = fedfs rpcfedfsd + +CLEANFILES = cscope.in.out cscope.out cscope.po.out *~ +DISTCLEANFILES = Makefile.in diff --git a/contrib/init/fedfs b/contrib/init/fedfs new file mode 100644 index 0000000..aa40100 --- /dev/null +++ b/contrib/init/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/rpcfedfsd b/contrib/init/rpcfedfsd new file mode 100755 index 0000000..93be6ed --- /dev/null +++ b/contrib/init/rpcfedfsd @@ -0,0 +1,121 @@ +#!/bin/bash +# +# rpcfedfsd Start up and shut down FedFS admin service +# +# chkconfig: 345 19 83 +# description: Starts user-level daemon for NFSv4 that handles \ +# FedFS administrative requests + +### BEGIN INIT INFO +# Provides: rpcfedfsd +# Required-Start: $network $syslog +# Required-Stop: $network $syslog +# Default-Start: 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Starts the NFSv4 fedfsd daemon +# Description: NFS is a popular protocol for file sharing across \ +# networks. This daemon processes FedFS administrative \ +# requests on NFSv4 exports. +### END INIT INFO + +## +## Copyright 2011 Oracle. All rights reserved. +## +## rpcfedfsd is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License version 2.0 as +## published by the Free Software Foundation. +## +## rpcfedfsd is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License version 2.0 for more details. +## +## A copy of the GNU General Public License version 2.0 is +## available here: +## +## http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +## + +# Source function library. +. /etc/init.d/functions + +# Source networking configuration. +[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network + +# Check for, and source, configuration file; otherwise set defaults +[ -f /etc/sysconfig/fedfs ] && . /etc/sysconfig/fedfs + +RETVAL=0 +prog="rpc.fedfsd" +LOCKFILE=/var/lock/subsys/$prog +uid=`id | cut -d\( -f1 | cut -d= -f2` + +case "$1" in + start|condstart) + # Check that networking is up. + [ "${NETWORKING}" != "yes" ] && exit 6 + + [ ! -x /usr/sbin/rpc.fedfsd ] && exit 5 + + # Only root can start the service + [ $uid -ne 0 ] && exit 4 + + # Make sure the daemon is not already running. + [ "$1" = "condstart" -a -n "`pidofproc $prog`" ] && { + killproc $prog "-SIGHUP" > /dev/null + exit 0 + } + [ "$1" = "start" ] && { + if status $prog > /dev/null ; then + exit 0 + fi + } + rm -f $LOCKFILE + + echo -n $"Starting RPC fedfsd: " + + # Start daemon. + daemon $prog ${RPCFEDFSDARGS} + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch $LOCKFILE + ;; + stop) + # Only root can stop the service + [ $uid -ne 0 ] && exit 4 + + # Stop daemon. + echo -n $"Stopping RPC fedfsd: " + killproc $prog + RETVAL=$? + echo + rm -f $LOCKFILE + ;; + status) + status rpc.fedfsd + RETVAL=$? + ;; + restart|reload|force-reload) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart|try-restart) + if [ -f $LOCKFILE ]; then + $0 restart + RETVAL=$? + fi + ;; + condstop) + if [ -f $LOCKFILE ]; then + $0 stop + RETVAL=$? + fi + ;; + *) + echo $"Usage: $0 {start|stop|restart|force-reload|condstart|condrestart|try-restart|status|condstop}" + RETVAL=2 + ;; +esac + +exit $RETVAL