SOURCES: idmapd.init (NEW), idmapd.sysconfig (NEW) - NFSv4 idmapd ...

baggins baggins at pld-linux.org
Mon May 8 14:01:18 CEST 2006


Author: baggins                      Date: Mon May  8 12:01:18 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- NFSv4 idmapd sysconfig and initscript

---- Files affected:
SOURCES:
   idmapd.init (NONE -> 1.1)  (NEW), idmapd.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/idmapd.init
diff -u /dev/null SOURCES/idmapd.init:1.1
--- /dev/null	Mon May  8 14:01:18 2006
+++ SOURCES/idmapd.init	Mon May  8 14:01:13 2006
@@ -0,0 +1,88 @@
+#!/bin/sh
+#
+# idmapd	This shell script takes care of starting and stopping
+#		the NFSv4 ID <-> Name Mapper.
+#
+# chkconfig:	345 61 19
+# description:	NFS is a popular protocol for file sharing across \
+#		TCP/IP networks. This service provides NFSv4 ID <-> \
+#		Name Mapper functionality.
+# probe:	true
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/idmapd ] && . /etc/sysconfig/idmapd
+
+# 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 "NFSv4 idmapd"
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then
+	[ -z "`/sbin/pidof portmap`" ] && nls "Error: portmap isn't running" && exit 0
+fi
+
+# Sanity checks
+[ -x /usr/sbin/rpc.statd ] || exit 0
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+	# Check if the service is already running?
+	if [ ! -f /var/lock/subsys/idmapd ]; then
+		# Start daemons.
+		msg_starting "NFSv4 idmapd"
+		daemon rpc.idmapd $IDMAPDOPTS
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/idmapd
+	else
+		msg_already_running "NFSv4 idmapd"
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/idmapd ]; then
+		# Stop daemons.
+		msg_stopping "NFSv4 idmapd"
+		killproc rpc.idmapd
+		rm -f /var/lock/subsys/idmapd
+	else
+		msg_not_running "NFSv4 idmapd"
+	fi
+	;;
+  status)
+	status rpc.idmapd
+	exit $?
+	;;
+  restart|force-reload)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  probe)
+	if [ ! -f /var/lock/subsys/idmapd ]; then
+		echo start
+		exit 0
+	fi
+	/sbin/pidof rpc.idmapd >/dev/null 2>&1; STATD="$?"
+	if [ $STATD = 1 ]; then
+		echo restart
+		exit 0
+	fi
+	;;
+  *)
+	msg_usage "$0 {start|stop|restart|force-reload|probe|status}"
+	exit 3
+esac
+
+exit $RETVAL

================================================================
Index: SOURCES/idmapd.sysconfig
diff -u /dev/null SOURCES/idmapd.sysconfig:1.1
--- /dev/null	Mon May  8 14:01:18 2006
+++ SOURCES/idmapd.sysconfig	Mon May  8 14:01:13 2006
@@ -0,0 +1,6 @@
+# Define nice level for idmapd daemon
+SERVICE_RUN_NICE_LEVEL="+0"
+
+# Options for rpc.idmapd
+# See rpc.statd(8) for valid options.
+IDMAPDOPTS=
================================================================


More information about the pld-cvs-commit mailing list