]> git.pld-linux.org Git - packages/rpcbind.git/commitdiff
- init scripts for rpcbind (portmap replacement)
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 24 Apr 2007 15:09:22 +0000 (15:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpcbind.init -> 1.1
    rpcbind.sysconfig -> 1.1

rpcbind.init [new file with mode: 0644]
rpcbind.sysconfig [new file with mode: 0644]

diff --git a/rpcbind.init b/rpcbind.init
new file mode 100644 (file)
index 0000000..7312e42
--- /dev/null
@@ -0,0 +1,91 @@
+#!/bin/sh
+#
+# rpcbind      Start/Stop RPC universal addresses to RPC program number mapper
+#
+# chkconfig:   345 11 89
+#
+# description: The rpcbind utility is a server that converts RPC program \
+#              numbers into universal addresses.  It must be running on \
+#              the host to be able to make RPC calls on a server on that \
+#              machine.
+# processname: rpcbind
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/rpcbind ] && . /etc/sysconfig/rpcbind
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+               msg_network_down rpcbind
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+start() {
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/rpcbind ]; then
+               is_no "${RPCBIND_RPCUSER}" || RPCBIND_OPTIONS="${RPCBIND_OPTIONS} -s"
+               is_no "${RPCBIND_VERBOSE}" || RPCBIND_OPTIONS="${RPCBIND_OPTIONS} -l"
+               is_yes "${RPCBIND_INSECURE}" && RPCBIND_OPTIONS="${RPCBIND_OPTIONS} -i"
+               [ -z "${RPCBIND_ADDRESSES}" ] || \
+                       for a in $RPCBIND_ADDRESSES ; do
+                               RPCBIND_OPTIONS="${RPCBIND_OPTIONS} -h $a"
+                       done
+               msg_starting rpcbind
+               daemon rpcbind ${RPCBIND_OPTIONS}
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rpcbind
+       else
+               msg_already_running rpcbind
+       fi
+}
+
+stop() {
+       if [ -f /var/lock/subsys/rpcbind ]; then
+               msg_stopping rpcbind
+               killproc rpcbind
+               rm -f /var/lock/subsys/rpcbind
+       else
+               msg_not_running rpcbind
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       RPCBIND_OPTIONS=
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  cleanup)
+       stop
+       RPCBIND_OPTIONS=
+       start
+       ;;
+  restart|force-reload)
+       stop
+       RPCBIND_OPTIONS="-w"
+       start
+       ;;
+  status)
+       status rpcbind
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|force-reload|cleanup|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/rpcbind.sysconfig b/rpcbind.sysconfig
new file mode 100644 (file)
index 0000000..003d116
--- /dev/null
@@ -0,0 +1,14 @@
+# Set nice level for rpcbind
+SERVICE_RUN_NICE_LEVEL="+1"
+
+# Cause rpcbind to change to the user rpc as soon as possible
+RPCBIND_RPCUSER="yes"
+
+# Turn on libwrap connection logging
+RPCBIND_VERBOSE="yes"
+
+# "Insecure" mode.  Allow calls to SET and UNSET from any host
+RPCBIND_INSECURE="no"
+
+# Specify specific IP addresses to bind to for UDP requests
+#RPCBIND_ADDRESSES="10.1.0.1"
This page took 0.091829 seconds and 4 git commands to generate.