3 # gssd Start up and shut down RPCSEC GSS daemon
6 # description: Starts user-level daemon that manages RPCSEC GSS contexts \
7 # for the NFSv4 client.
9 # Source function library.
10 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network
15 # Check that networking is up.
16 if is_yes "${NETWORKING}"; then
17 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
18 msg_network_down "RPC gssd"
25 if [ "$1" != "stop" ]; then
26 check_portmapper || { nls "Error: portmap isn't running" && exit 0; }
30 [ -f /etc/sysconfig/nfsfs ] && . /etc/sysconfig/nfsfs
32 is_yes "${SECURE_NFS}" || exit 0
34 # List of kernel modules to load
35 [ -z "${SECURE_NFS_MODS}" ] && SECURE_NFS_MODS="des rpcsec_gss_krb5"
37 # /usr may be on NFS, fail silently, nfsfs will start it
38 [ -x /usr/sbin/rpc.gssd ] || exit 0
41 # Check if the service is already running?
42 if [ ! -f /var/lock/subsys/gssd ]; then
43 if ! grep -q rpc_pipefs /proc/mounts ; then
44 modprobe sunrpc >/dev/null 2>&1
45 run_cmd "Mounting /var/lib/nfs/rpc_pipefs filesystem" \
46 mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
49 for i in ${SECURE_NFS_MODS} ; do
50 _modprobe single die $i
52 msg_starting "RPC gssd"
53 daemon rpc.gssd $RPCGSSOPTIONS
55 [ $RETVAL = 0 ] && touch /var/lock/subsys/gssd
57 msg_already_running "RPC gssd"
62 if [ -f /var/lock/subsys/gssd ]; then
63 msg_stopping "RPC gssd"
65 rm -f /var/lock/subsys/gssd
67 msg_not_running "RPC gssd"
71 # See how we were called.
89 msg_usage "$0 {start|stop|restart|status}"