This commit is contained in:
committed by
Git OBS Bridge
parent
826b083ee5
commit
2b4f8de9e4
27
nfs.init
27
nfs.init
@@ -93,7 +93,7 @@ if test -x /sbin/portmap ; then
|
||||
PORTMAP_BIN=/sbin/portmap
|
||||
elif test -x /sbin/rpcbind ; then
|
||||
PORTMAP_BIN=/sbin/rpcbind
|
||||
else
|
||||
elif test $nfs = yes ; then
|
||||
echo "portmap/rpcbind is missing"
|
||||
rc_failed 3
|
||||
rc_status -v
|
||||
@@ -154,8 +154,21 @@ do_start_idmapd() {
|
||||
}
|
||||
|
||||
rc_reset
|
||||
case "$1" in
|
||||
start|reload)
|
||||
case "$1-$nfs" in
|
||||
start-no|reload-no)
|
||||
# Always run smnotify, even if no mounts are listed in fstab.
|
||||
# If there is nothing to do, it will exit quickly, and if there
|
||||
# is something to do, the sooner it is done, the better.
|
||||
/usr/sbin/sm-notify $SM_NOTIFY_OPTIONS
|
||||
echo -n "Not starting NFS client services - no NFS found in /etc/fstab:"
|
||||
rc_status -u
|
||||
;;
|
||||
stop-no )
|
||||
echo -n "Not stopping NFS client services:"
|
||||
rc_status -u
|
||||
;;
|
||||
|
||||
start-yes|reload-yes)
|
||||
echo -n "Starting NFS client services:"
|
||||
if ! checkproc $PORTMAP_BIN ; then
|
||||
echo "portmap/rpcbind is not running"
|
||||
@@ -214,7 +227,7 @@ case "$1" in
|
||||
#
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
stop-yes)
|
||||
echo -n "Shutting down NFS client services:"
|
||||
#
|
||||
# Unmount background because during long timeouts
|
||||
@@ -254,14 +267,14 @@ case "$1" in
|
||||
#
|
||||
rc_status -v
|
||||
;;
|
||||
restart|force-reload)
|
||||
restart*|force-reload*)
|
||||
## Stop the service and regardless of whether it was
|
||||
## running or not, start it again.
|
||||
$0 stop
|
||||
$0 start
|
||||
rc_status
|
||||
;;
|
||||
status)
|
||||
status*)
|
||||
echo -n "Checking for mounted nfs shares (from /etc/fstab):"
|
||||
if test "$nfs" = yes ; then
|
||||
rc_failed $status
|
||||
@@ -283,7 +296,7 @@ case "$1" in
|
||||
fi
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
try-restart*|condrestart*)
|
||||
$0 status
|
||||
if test $? -eq 0; then
|
||||
$0 restart
|
||||
|
Reference in New Issue
Block a user