mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdb-scripts: Remove functions startstop_nfs() and startstop_nfslock()
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
1e4016036c
commit
d332013123
@ -704,76 +704,6 @@ startstop_ganesha()
|
||||
esac
|
||||
}
|
||||
|
||||
########################################################
|
||||
# start/stop the nfs service on different platforms
|
||||
########################################################
|
||||
startstop_nfs() {
|
||||
PLATFORM="unknown"
|
||||
[ -x $CTDB_ETCDIR/init.d/nfsserver ] && {
|
||||
PLATFORM="sles"
|
||||
}
|
||||
[ -x $CTDB_ETCDIR/init.d/nfslock -o \
|
||||
-r /usr/lib/systemd/system/nfs-lock.service ] && {
|
||||
PLATFORM="rhel"
|
||||
}
|
||||
|
||||
case $PLATFORM in
|
||||
sles)
|
||||
case $1 in
|
||||
start)
|
||||
service nfsserver start
|
||||
;;
|
||||
stop)
|
||||
service nfsserver stop > /dev/null 2>&1
|
||||
;;
|
||||
restart)
|
||||
set_proc "fs/nfsd/threads" 0
|
||||
service nfsserver stop > /dev/null 2>&1
|
||||
pkill -9 nfsd
|
||||
nfs_dump_some_threads
|
||||
service nfsserver start
|
||||
;;
|
||||
restart-stop)
|
||||
set_proc "fs/nfsd/threads" 0
|
||||
service nfsserver stop > /dev/null 2>&1
|
||||
pkill -9 nfsd
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
rhel)
|
||||
case $1 in
|
||||
start)
|
||||
service nfslock start
|
||||
service nfs start
|
||||
;;
|
||||
stop)
|
||||
service nfs stop
|
||||
service nfslock stop
|
||||
;;
|
||||
restart)
|
||||
set_proc "fs/nfsd/threads" 0
|
||||
service nfs stop > /dev/null 2>&1
|
||||
service nfslock stop > /dev/null 2>&1
|
||||
pkill -9 nfsd
|
||||
nfs_dump_some_threads
|
||||
service nfslock start
|
||||
service nfs start
|
||||
;;
|
||||
restart-stop)
|
||||
set_proc "fs/nfsd/threads" 0
|
||||
service nfs stop > /dev/null 2>&1
|
||||
service nfslock stop > /dev/null 2>&1
|
||||
pkill -9 nfsd
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Unknown platform. NFS is not supported with ctdb"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Dump up to the configured number of nfsd thread backtraces.
|
||||
nfs_dump_some_threads ()
|
||||
{
|
||||
@ -785,57 +715,6 @@ nfs_dump_some_threads ()
|
||||
program_stack_traces "$_prog" $_num
|
||||
}
|
||||
|
||||
########################################################
|
||||
# start/stop the nfs lockmanager service on different platforms
|
||||
########################################################
|
||||
startstop_nfslock() {
|
||||
PLATFORM="unknown"
|
||||
[ -x $CTDB_ETCDIR/init.d/nfsserver ] && {
|
||||
PLATFORM="sles"
|
||||
}
|
||||
[ -x $CTDB_ETCDIR/init.d/nfslock -o \
|
||||
-r /usr/lib/systemd/system/nfs-lock.service ] && {
|
||||
PLATFORM="rhel"
|
||||
}
|
||||
|
||||
case $PLATFORM in
|
||||
sles)
|
||||
# for sles there is no service for lockmanager
|
||||
# so we instead just shutdown/restart nfs
|
||||
case $1 in
|
||||
start)
|
||||
service nfsserver start
|
||||
;;
|
||||
stop)
|
||||
service nfsserver stop > /dev/null 2>&1
|
||||
;;
|
||||
restart)
|
||||
service nfsserver stop > /dev/null 2>&1
|
||||
service nfsserver start
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
rhel)
|
||||
case $1 in
|
||||
start)
|
||||
service nfslock start
|
||||
;;
|
||||
stop)
|
||||
service nfslock stop > /dev/null 2>&1
|
||||
;;
|
||||
restart)
|
||||
service nfslock stop > /dev/null 2>&1
|
||||
service nfslock start
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Unknown platform. NFS locking is not supported with ctdb"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
########################################################
|
||||
|
||||
add_ip_to_iface ()
|
||||
|
@ -814,7 +814,6 @@ setup_nfs ()
|
||||
eventscript_call ctdb_service_unmanaged
|
||||
service "nfs" force-stopped
|
||||
service "nfslock" force-stopped
|
||||
eventscript_call startstop_nfs stop
|
||||
|
||||
export CTDB_MANAGED_SERVICES="foo bar"
|
||||
unset CTDB_MANAGES_NFS
|
||||
|
Loading…
Reference in New Issue
Block a user