-#!/bin/bash
+#!/bin/sh
#
-# rpcidmapd Start up and shut down RPC name to UID/GID mapper
+# idmapd Start up and shut down RPC name to UID/GID mapper
#
-# Authors: Chuck Lever <cel@netapp.com>
-#
-# chkconfig: 345 12 83
-# description: Starts user-level daemon for NFSv4 that maps user \
-# names to UID and GID numbers.
+# chkconfig: 345 12 83
+# description: Starts user-level daemon for NFSv4 that maps user \
+# names to UID and GID numbers.
# Source function library.
. /etc/rc.d/init.d/functions
# 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 "RPC svcgssd"
+ msg_network_down "RPC 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
+if [ "$1" != "stop" ]; then
+ check_portmapper || { nls "Error: portmap isn't running" && exit 0; }
fi
# Get service config
# starting idmapd on NFS server
if [ -e "$RUNLEVELDIR"/S*nfs ]; then
if ! grep -q nfsd /proc/mounts ; then
- modprobe -s nfsd > /dev/null 2>&1
+ modprobe nfsd > /dev/null 2>&1
run_cmd "Mounting /proc/fs/nfsd filesystem" mount -t nfsd nfsd /proc/fs/nfsd
fi
fi
if ! grep -q rpc_pipefs /proc/mounts ; then
- modprobe -s sunrpc >/dev/null 2>&1
+ modprobe sunrpc >/dev/null 2>&1
run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" \
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
fi