2006-12-19 01:34:50 +01:00
|
|
|
#! /bin/sh
|
2007-06-05 20:06:28 +02:00
|
|
|
# Copyright (c) 1996 - 2007 SuSE GmbH Nuernberg, Germany. All rights reserved.
|
2006-12-19 01:34:50 +01:00
|
|
|
#
|
|
|
|
# Author: Florian La Roche <florian@suse.de>, 1996
|
|
|
|
# Werner Fink <werner@suse.de>, 1996,98
|
|
|
|
# Burchard Steinbild <bs@suse.de>, 1997
|
|
|
|
# Thorsten Kukuk <kukuk@suse.de>, 2000,01
|
|
|
|
#
|
|
|
|
# /etc/init.d/nfsserver
|
|
|
|
#
|
|
|
|
### BEGIN INIT INFO
|
2008-08-15 01:10:44 +02:00
|
|
|
# Provides: nfsserver
|
2008-03-27 22:28:19 +01:00
|
|
|
# Required-Start: $network $named $portmap
|
2008-08-15 01:10:44 +02:00
|
|
|
# Required-Stop: $network $portmap
|
|
|
|
# Should-Start: ypbind krb5kdc
|
|
|
|
# Should-Stop: ypbind krb5kdc
|
|
|
|
# Default-Start: 3 5
|
|
|
|
# Default-Stop: 0 1 2 6
|
2007-06-05 20:06:28 +02:00
|
|
|
# Short-Description: Start the kernel based NFS daemon
|
2006-12-19 01:34:50 +01:00
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
. /etc/sysconfig/nfs
|
|
|
|
|
|
|
|
# Shell functions sourced from /etc/rc.status:
|
|
|
|
# rc_check check and set local and overall rc status
|
|
|
|
# rc_status check and set local and overall rc status
|
|
|
|
# rc_status -v ditto but be verbose in local rc status
|
|
|
|
# rc_status -v -r ditto and clear the local rc status
|
|
|
|
# rc_failed set local and overall rc status to failed
|
|
|
|
# rc_failed <num> set local and overall rc status to <num><num>
|
|
|
|
# rc_reset clear local rc status (overall remains)
|
|
|
|
# rc_exit exit appropriate to overall rc status
|
|
|
|
. /etc/rc.status
|
|
|
|
|
|
|
|
# First reset status of this service
|
|
|
|
rc_reset
|
|
|
|
|
|
|
|
# Return values acc. to LSB for all commands but status:
|
|
|
|
# 0 - success
|
|
|
|
# 1 - generic or unspecified error
|
|
|
|
# 2 - invalid or excess argument(s)
|
|
|
|
# 3 - unimplemented feature (e.g. "reload")
|
|
|
|
# 4 - insufficient privilege
|
|
|
|
# 5 - program is not installed
|
|
|
|
# 6 - program is not configured
|
|
|
|
# 7 - program is not running
|
2013-07-22 08:50:28 +02:00
|
|
|
#
|
2006-12-19 01:34:50 +01:00
|
|
|
# Note that starting an already running service, stopping
|
|
|
|
# or restarting a not-running service as well as the restart
|
|
|
|
# with force-reload (in case signalling is not supported) are
|
|
|
|
# considered a success.
|
|
|
|
|
2011-06-01 18:25:59 +02:00
|
|
|
# XXX: there should be separate init scripts for these really
|
2007-06-05 20:06:28 +02:00
|
|
|
SVCGSSD_BIN=/usr/sbin/rpc.svcgssd
|
2013-11-06 03:21:12 +01:00
|
|
|
GSSD_BIN=/usr/sbin/rpc.gssd
|
2007-06-05 20:06:28 +02:00
|
|
|
IDMAPD_BIN=/usr/sbin/rpc.idmapd
|
|
|
|
NFSD_BIN=/usr/sbin/rpc.nfsd
|
|
|
|
|
2012-11-28 01:31:37 +01:00
|
|
|
IDMAPD_CLIENT_STATE=/run/nfs/nfs-rpc.idmapd
|
|
|
|
IDMAPD_SERVER_STATE=/run/nfs/nfsserver-rpc.idmapd
|
|
|
|
NFSD_BIND_MOUNTS=/run/nfs/bind.mounts
|
2013-11-06 03:21:12 +01:00
|
|
|
GSSD_CLIENT_STATE=/run/nfs/nfs-rpc.gssd
|
|
|
|
GSSD_SERVER_STATE=/run/nfs/nfsserver-rpc.gssd
|
2007-06-05 20:06:28 +02:00
|
|
|
|
|
|
|
NEED_SVCGSSD=no
|
|
|
|
NEED_IDMPAPD=no
|
|
|
|
|
2006-12-19 01:34:50 +01:00
|
|
|
case `uname -r` in
|
|
|
|
0.*|1.*|2.0.*) exit 3
|
|
|
|
esac
|
|
|
|
|
2007-06-05 20:06:28 +02:00
|
|
|
case $NFS_SECURITY_GSS in
|
|
|
|
[Nn]*) flavors="";;
|
|
|
|
[Yy]*) flavors=krb5;;
|
|
|
|
*) flavors="$NFS_SECURITY_GSS";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "$flavors" ]; then
|
|
|
|
NEED_SVCGSSD=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$NFS4_SUPPORT" = yes ]; then
|
|
|
|
NEED_IDMAPD=yes
|
|
|
|
fi
|
|
|
|
|
2011-06-23 07:52:18 +02:00
|
|
|
if [ -z "$RPC_PIPEFS_DIR" ]; then
|
|
|
|
RPC_PIPEFS_DIR=/var/lib/nfs/rpc_pipefs
|
|
|
|
fi
|
|
|
|
|
2006-12-19 01:34:50 +01:00
|
|
|
check_for_nfsdfs() {
|
|
|
|
HAVE_NFSDFS="no"
|
|
|
|
while read dummy type ; do
|
|
|
|
if [ "$type" = "nfsd" ] ; then
|
|
|
|
HAVE_NFSDFS="yes"
|
|
|
|
fi
|
|
|
|
done < /proc/filesystems
|
|
|
|
}
|
|
|
|
|
2007-01-08 18:25:13 +01:00
|
|
|
nfs4_bind_mounts() {
|
2012-11-28 01:31:37 +01:00
|
|
|
[ -d /run/nfs ] || mkdir /run/nfs
|
|
|
|
warned=no
|
2007-01-08 18:25:13 +01:00
|
|
|
# In case of doubt, try "man sed" :-)
|
|
|
|
cat /etc/exports |
|
2007-12-18 18:53:26 +01:00
|
|
|
sed -n 'H;g;s/\\$//;h;t;s/^\n//;s/\n[[:space:]]*//g;s/#.*//;p;s/.*//;h' |
|
2007-01-08 18:25:13 +01:00
|
|
|
sed 's/^\([^[:space:]]*\).*bind=\([^,)]*\).*/\1 \2/;t;d' |
|
|
|
|
sort |
|
|
|
|
while read export dir; do
|
2012-11-28 01:31:37 +01:00
|
|
|
if [ $warned = no ] ; then
|
|
|
|
echo
|
|
|
|
echo "NFS: The usage of 'bind=' in /etc/exports is deprecated."
|
|
|
|
echo "NFS: Is it no longer needed and may cease to work."
|
|
|
|
echo "NFS: Please remove these settings."
|
|
|
|
warned=yes
|
2013-07-22 08:50:28 +02:00
|
|
|
fi >&2
|
2010-05-10 01:55:36 +02:00
|
|
|
test -d "$export" || mkdir -p "$export"
|
2012-05-02 03:36:09 +02:00
|
|
|
mount -o bind "$dir" "$export"
|
|
|
|
echo "$dir" "$export"
|
|
|
|
done > $NFSD_BIND_MOUNTS
|
2007-01-08 18:25:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
nfs4_unbind_mounts() {
|
2012-05-02 03:36:09 +02:00
|
|
|
sort -r -k2 $NFSD_BIND_MOUNTS |
|
2007-01-08 18:25:13 +01:00
|
|
|
while read src mountpoint crap; do
|
2013-07-22 08:50:28 +02:00
|
|
|
[ -n "$mountpoint" ] && umount -l "$mountpoint"
|
2007-01-08 18:25:13 +01:00
|
|
|
done
|
2012-05-02 03:36:09 +02:00
|
|
|
> $NFSD_BIND_MOUNTS
|
2007-01-08 18:25:13 +01:00
|
|
|
}
|
|
|
|
|
2007-06-05 20:06:28 +02:00
|
|
|
mount_rpc_pipefs() {
|
|
|
|
|
|
|
|
# See if the file system is there yet
|
2011-06-23 07:52:18 +02:00
|
|
|
case `stat -c "%t" -f "$RPC_PIPEFS_DIR"` in
|
2007-06-05 20:06:28 +02:00
|
|
|
*67596969*)
|
|
|
|
return 0;;
|
|
|
|
esac
|
|
|
|
|
2011-06-23 07:52:18 +02:00
|
|
|
mount -t rpc_pipefs rpc_pipefs "$RPC_PIPEFS_DIR"
|
2007-06-05 20:06:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
umount_rpc_pipefs() {
|
|
|
|
|
2011-06-23 07:52:18 +02:00
|
|
|
case `stat -c "%t" -f "$RPC_PIPEFS_DIR"` in
|
2007-06-05 20:06:28 +02:00
|
|
|
*67596969*)
|
2011-06-23 07:52:18 +02:00
|
|
|
umount "$RPC_PIPEFS_DIR";;
|
2007-06-05 20:06:28 +02:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
do_start_svcgssd() {
|
|
|
|
for flavor in $flavors; do
|
|
|
|
/sbin/modprobe rpcsec_gss_$flavor
|
|
|
|
done
|
|
|
|
|
|
|
|
mount_rpc_pipefs
|
2011-06-23 07:52:18 +02:00
|
|
|
startproc $SVCGSSD_BIN $SVCGSSD_OPTIONS
|
2007-06-05 20:06:28 +02:00
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
2013-11-06 03:21:12 +01:00
|
|
|
do_start_gssd() {
|
|
|
|
if ! checkproc $GSSD_BIN; then
|
|
|
|
case $NFS_GSSD_AVOID_DNS in
|
|
|
|
[Nn]*) ignore_dns=-D ;;
|
|
|
|
[Yy]*) ignore_dns= ;;
|
|
|
|
* ) ignore_dns=-D
|
|
|
|
esac
|
|
|
|
mount_rpc_pipefs
|
|
|
|
startproc $GSSD_BIN $ignore_dns $GSSD_OPTIONS -p $RPC_PIPEFS_DIR
|
|
|
|
return $?
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2007-06-05 20:06:28 +02:00
|
|
|
do_start_idmapd() {
|
|
|
|
mount_rpc_pipefs
|
|
|
|
|
|
|
|
if checkproc $IDMAPD_BIN && test -f $IDMAPD_CLIENT_STATE; then
|
|
|
|
killproc -HUP $IDMAPD_BIN
|
|
|
|
else
|
2013-11-06 03:21:12 +01:00
|
|
|
startproc $IDMAPD_BIN -p $RPC_PIPEFS_DIR
|
2008-08-15 01:10:44 +02:00
|
|
|
return $?
|
2007-06-05 20:06:28 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2006-12-19 01:34:50 +01:00
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
PARAMS=3
|
|
|
|
test "$USE_KERNEL_NFSD_NUMBER" -gt 0 && PARAMS="$USE_KERNEL_NFSD_NUMBER"
|
|
|
|
|
2007-06-05 20:06:28 +02:00
|
|
|
echo -n "Starting kernel based NFS server:"
|
2006-12-19 01:34:50 +01:00
|
|
|
modprobe nfsd
|
2008-12-02 15:33:46 +01:00
|
|
|
|
|
|
|
# this can be removed when modprobe allows the sysctl to be
|
|
|
|
# moved to modprobe.d without breaking --show-depends
|
|
|
|
grep '^fs.nfs.n[sl]m' /etc/sysctl.conf | sysctl -q -e -n -p -
|
|
|
|
|
2007-06-05 20:06:28 +02:00
|
|
|
# mount nfsd filesystem
|
2006-12-19 01:34:50 +01:00
|
|
|
check_for_nfsdfs
|
|
|
|
if [ "$HAVE_NFSDFS" = "yes" -a ! -f /proc/fs/nfsd/exports ] ; then
|
|
|
|
mount -t nfsd nfsd /proc/fs/nfsd
|
|
|
|
rc_status
|
|
|
|
fi
|
2010-05-10 01:55:36 +02:00
|
|
|
VERSION_PARAMS=
|
2012-05-02 03:43:09 +02:00
|
|
|
if [ "$NFS3_SERVER_SUPPORT" == "no" ]; then
|
2010-05-10 01:55:36 +02:00
|
|
|
VERSION_PARAMS="--no-nfs-version 2 --no-nfs-version 3"
|
|
|
|
fi
|
2012-05-02 03:43:09 +02:00
|
|
|
if [ "$NFS4_SUPPORT" != "yes" ]; then
|
2007-09-14 16:24:10 +02:00
|
|
|
VERSION_PARAMS="--no-nfs-version 4"
|
2006-12-19 01:34:50 +01:00
|
|
|
fi
|
2013-07-22 08:50:28 +02:00
|
|
|
if [ "$NFS4_SERVER_MINOR_VERSION" != "0" ]; then
|
2013-11-18 04:36:58 +01:00
|
|
|
VERSION_PARAMS="$VERSION_PARAMS --nfs-version 4 -nfs-version 4.$NFS4_SERVER_MINOR_VERSION"
|
2013-07-22 08:50:28 +02:00
|
|
|
fi
|
2011-06-02 08:49:18 +02:00
|
|
|
if [ -n "$NFSV4LEASETIME" -a -f /proc/fs/nfsd/nfsv4leasetime ]; then
|
|
|
|
echo "$NFSV4LEASETIME" > /proc/fs/nfsd/nfsv4leasetime
|
|
|
|
fi
|
|
|
|
|
2007-01-08 18:25:13 +01:00
|
|
|
nfs4_bind_mounts
|
2013-11-06 03:21:12 +01:00
|
|
|
# svcgssd; gssd; idmapd
|
2007-06-05 20:06:28 +02:00
|
|
|
if [ "$NEED_SVCGSSD" = yes ]; then
|
|
|
|
echo -n " svcgssd"
|
2008-05-16 14:47:01 +02:00
|
|
|
do_start_svcgssd || {
|
2013-11-06 03:21:12 +01:00
|
|
|
rc_status -v
|
2007-06-05 20:06:28 +02:00
|
|
|
rc_exit
|
2008-05-16 14:47:01 +02:00
|
|
|
}
|
2013-11-06 03:21:12 +01:00
|
|
|
echo -n " gssd"
|
|
|
|
do_start_gssd || {
|
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
|
|
|
}
|
|
|
|
echo $GSSD_BIN > $GSSD_SERVER_STATE
|
2007-06-05 20:06:28 +02:00
|
|
|
fi
|
|
|
|
if [ "$NEED_IDMAPD" = yes ]; then
|
|
|
|
echo -n " idmapd"
|
2008-05-16 14:47:01 +02:00
|
|
|
do_start_idmapd || {
|
2007-06-05 20:06:28 +02:00
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
2008-05-16 14:47:01 +02:00
|
|
|
}
|
2012-11-28 01:31:37 +01:00
|
|
|
[ -d /run/nfs ] || mkdir /run/nfs
|
2007-06-05 20:06:28 +02:00
|
|
|
echo $IDMAPD_BIN > $IDMAPD_SERVER_STATE
|
|
|
|
fi
|
|
|
|
# exportfs
|
2013-07-22 08:50:28 +02:00
|
|
|
/usr/sbin/exportfs -r
|
2007-06-05 20:06:28 +02:00
|
|
|
# rpc.mountd
|
|
|
|
echo -n " mountd"
|
2006-12-19 01:34:50 +01:00
|
|
|
if [ -n "$MOUNTD_PORT" ] ; then
|
2013-03-09 07:53:10 +01:00
|
|
|
startproc /usr/sbin/rpc.mountd -p $MOUNTD_PORT $MOUNTD_OPTIONS $VERSION_PARAMS
|
2006-12-19 01:34:50 +01:00
|
|
|
else
|
2013-03-09 07:53:10 +01:00
|
|
|
startproc /usr/sbin/rpc.mountd $MOUNTD_OPTIONS $VERSION_PARAMS
|
2008-05-16 14:47:01 +02:00
|
|
|
fi || {
|
2007-06-05 20:06:28 +02:00
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
2008-05-16 14:47:01 +02:00
|
|
|
}
|
2007-06-05 20:06:28 +02:00
|
|
|
# rpc.statd
|
2010-05-10 01:55:36 +02:00
|
|
|
if [ "$NFS3_SERVER_SUPPORT" != "no" ]; then
|
|
|
|
echo -n " statd"
|
|
|
|
startproc /usr/sbin/rpc.statd --no-notify $STATD_OPTIONS || {
|
2007-06-05 20:06:28 +02:00
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
2010-05-10 01:55:36 +02:00
|
|
|
}
|
|
|
|
fi
|
2007-06-05 20:06:28 +02:00
|
|
|
# rpc.nfsd
|
|
|
|
echo -n " nfsd"
|
2011-06-23 07:52:18 +02:00
|
|
|
$NFSD_BIN $NFSD_OPTIONS $PARAMS $VERSION_PARAMS || {
|
2007-06-05 20:06:28 +02:00
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
2008-05-16 14:47:01 +02:00
|
|
|
}
|
2007-06-05 20:06:28 +02:00
|
|
|
# sm-notify needs to be run last
|
|
|
|
echo -n " sm-notify"
|
2008-05-05 00:59:56 +02:00
|
|
|
/usr/sbin/sm-notify $SM_NOTIFY_OPTIONS
|
2007-06-05 20:06:28 +02:00
|
|
|
#
|
2006-12-19 01:34:50 +01:00
|
|
|
rc_status -v
|
|
|
|
;;
|
|
|
|
stop)
|
2007-06-05 20:06:28 +02:00
|
|
|
echo -n "Shutting down kernel based NFS server:"
|
|
|
|
# rpc.nfsd
|
|
|
|
echo -n " nfsd"
|
2008-05-16 14:47:01 +02:00
|
|
|
killproc -n -KILL nfsd || {
|
2007-06-05 20:06:28 +02:00
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
2008-05-16 14:47:01 +02:00
|
|
|
}
|
2007-06-05 20:06:28 +02:00
|
|
|
# rpc.statd
|
|
|
|
if ! checkproc -n lockd; then
|
|
|
|
echo -n " statd"
|
|
|
|
killproc rpc.statd
|
2011-02-17 00:51:28 +01:00
|
|
|
else
|
|
|
|
# tell lockd to drop all client locks
|
|
|
|
killproc -n -KILL lockd
|
2007-06-05 20:06:28 +02:00
|
|
|
fi
|
2011-02-17 00:51:28 +01:00
|
|
|
# make sure sm-notify is run on restart, as we have dropped some locks
|
2012-11-28 01:31:37 +01:00
|
|
|
rm -f /run/sm-notify.pid
|
2007-06-05 20:06:28 +02:00
|
|
|
#
|
|
|
|
# rpc.mountd
|
|
|
|
echo -n " mountd"
|
2008-05-16 14:47:01 +02:00
|
|
|
killproc -TERM /usr/sbin/rpc.mountd || {
|
2007-06-05 20:06:28 +02:00
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
2008-05-16 14:47:01 +02:00
|
|
|
}
|
2007-06-05 20:06:28 +02:00
|
|
|
# svcgssd
|
|
|
|
if [ "$NEED_SVCGSSD" = yes ]; then
|
|
|
|
echo -n " svcgssd"
|
2008-05-16 14:47:01 +02:00
|
|
|
killproc $SVCGSSD_BIN || {
|
2007-06-05 20:06:28 +02:00
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
2008-05-16 14:47:01 +02:00
|
|
|
}
|
2013-11-06 03:21:12 +01:00
|
|
|
# kill only if not needed by client anymore
|
|
|
|
if [ ! -f $GSSD_CLIENT_STATE ]; then
|
|
|
|
echo -n " gssd"
|
|
|
|
killproc $GSSD_BIN || {
|
|
|
|
rc_status -v
|
|
|
|
rc_exit
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
rm -f $GSSD_SERVER_STATE
|
2007-06-05 20:06:28 +02:00
|
|
|
fi
|
|
|
|
# idmap
|
|
|
|
if [ "$NEED_IDMAPD" = yes ]; then
|
|
|
|
# kill only if not needed by client anymore
|
|
|
|
if [ ! -f $IDMAPD_CLIENT_STATE ]; then
|
|
|
|
echo -n " idmapd"
|
|
|
|
killproc $IDMAPD_BIN
|
|
|
|
fi
|
|
|
|
rm -f $IDMAPD_SERVER_STATE
|
|
|
|
fi
|
2013-11-06 03:21:12 +01:00
|
|
|
# umount rpc_pipefs only if not needed by client
|
|
|
|
if [ ! -f $GSSD_CLIENT_STATE -a ! -f $IDMAPD_CLIENT_STATE ] ; then
|
|
|
|
umount_rpc_pipefs
|
|
|
|
fi
|
2007-06-05 20:06:28 +02:00
|
|
|
# umount nfsd fs
|
2006-12-19 01:34:50 +01:00
|
|
|
check_for_nfsdfs
|
|
|
|
if [ "$HAVE_NFSDFS" = "yes" -a -f /proc/fs/nfsd/exports ] ; then
|
2013-11-06 03:21:12 +01:00
|
|
|
umount /proc/fs/nfsd
|
|
|
|
rc_status
|
2006-12-19 01:34:50 +01:00
|
|
|
fi
|
2007-01-08 18:25:13 +01:00
|
|
|
nfs4_unbind_mounts
|
2007-06-05 20:06:28 +02:00
|
|
|
#
|
2006-12-19 01:34:50 +01:00
|
|
|
rc_status -v
|
|
|
|
;;
|
|
|
|
try-restart)
|
2013-07-22 08:50:28 +02:00
|
|
|
## Stop the service and if this succeeds (i.e. the
|
2006-12-19 01:34:50 +01:00
|
|
|
## service was running before), start it again.
|
|
|
|
$0 status >/dev/null && $0 restart
|
|
|
|
|
|
|
|
# Remember status and be quiet
|
|
|
|
rc_status
|
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
## Stop the service and regardless of whether it was
|
|
|
|
## running or not, start it again.
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
|
|
|
|
|
|
|
# Remember status and be quiet
|
|
|
|
rc_status
|
|
|
|
;;
|
|
|
|
reload|force-reload)
|
|
|
|
echo -n "Reload kernel based NFS server"
|
2007-01-08 18:25:13 +01:00
|
|
|
# Unfortunately, there's no sane way of doing this:
|
|
|
|
nfs4_unbind_mounts; nfs4_bind_mounts
|
2006-12-19 01:34:50 +01:00
|
|
|
/usr/sbin/exportfs -r
|
|
|
|
rc_status -v
|
|
|
|
;;
|
|
|
|
status)
|
2007-06-05 20:06:28 +02:00
|
|
|
echo -n "Checking for kernel based NFS server:"
|
2006-12-19 01:34:50 +01:00
|
|
|
## Check status with checkproc(8), if process is running
|
|
|
|
## checkproc will return with exit status 0.
|
|
|
|
|
|
|
|
# Status has a slightly different for the status command:
|
|
|
|
# 0 - service running
|
2012-11-28 01:31:37 +01:00
|
|
|
# 1 - service dead, but /run/ pid file exists
|
2006-12-19 01:34:50 +01:00
|
|
|
# 2 - service dead, but /var/lock/ lock file exists
|
|
|
|
# 3 - service not running
|
|
|
|
|
|
|
|
# NOTE: checkproc returns LSB compliant status values.
|
2007-06-05 20:06:28 +02:00
|
|
|
if [ "$NEED_SVCGSSD" = yes ]; then
|
|
|
|
echo -n " svcgssd"
|
|
|
|
checkproc $SVCGSSD_BIN
|
2008-05-05 00:59:56 +02:00
|
|
|
rc_status -v
|
2013-11-06 03:21:12 +01:00
|
|
|
echo -n " gssd"
|
|
|
|
checkproc $GSSD_BIN
|
|
|
|
rc_status -v
|
2007-06-05 20:06:28 +02:00
|
|
|
fi
|
|
|
|
if [ "$NEED_IDMAPD" = yes ]; then
|
|
|
|
echo -n " idmapd"
|
|
|
|
checkproc $IDMAPD_BIN
|
2008-05-05 00:59:56 +02:00
|
|
|
rc_status -v
|
2013-07-22 08:50:28 +02:00
|
|
|
fi
|
2007-06-05 20:06:28 +02:00
|
|
|
echo -n " mountd"
|
2006-12-19 01:34:50 +01:00
|
|
|
checkproc /usr/sbin/rpc.mountd
|
2008-05-05 00:59:56 +02:00
|
|
|
rc_status -v
|
2007-06-05 20:06:28 +02:00
|
|
|
echo -n " statd"
|
|
|
|
checkproc /usr/sbin/rpc.statd
|
2008-05-05 00:59:56 +02:00
|
|
|
rc_status -v
|
2007-06-05 20:06:28 +02:00
|
|
|
echo -n " nfsd"
|
2006-12-19 01:34:50 +01:00
|
|
|
checkproc -n nfsd
|
|
|
|
rc_status -v
|
2007-06-05 20:06:28 +02:00
|
|
|
|
2006-12-19 01:34:50 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
rc_exit
|