diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-05-25 23:29:36 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-06-01 00:36:01 +0200 |
commit | 39366733c3fe943363566756e2e152c45a1b3cb2 (patch) | |
tree | 228b0735896af90ca78151c9a69aa3efd12c8cae /patches/source/rpcbind/rc.rpc | |
parent | d31c50870d0bee042ce660e445c9294a59a3a65b (diff) | |
download | current-39366733c3fe943363566756e2e152c45a1b3cb2.tar.gz |
Fri May 25 23:29:36 UTC 201814.2
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.2.txz: Rebuilt.
Handle removal of US/Pacific-New timezone. If we see that the machine is
using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/rpcbind/rc.rpc')
-rw-r--r-- | patches/source/rpcbind/rc.rpc | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/patches/source/rpcbind/rc.rpc b/patches/source/rpcbind/rc.rpc new file mode 100644 index 00000000..c850c556 --- /dev/null +++ b/patches/source/rpcbind/rc.rpc @@ -0,0 +1,64 @@ +#!/bin/sh +# rc.rpc: start/stop/restart RPC daemons needed to use NFS. +# +# You must run these daemons in order to mount NFS partitions +# (unless you use the mount option '-o nolock', which can +# corrupt files and is not generally recommended unless you +# are mounting the partition(s) as read-only). +# +# To run an NFS server, starting these is mandatory. +# + +rpc_start() { + if [ -x /sbin/rpcbind -a -x /sbin/rpc.statd ]; then + if ! ps axc | grep -q rpcbind ; then + echo "Starting RPC portmapper: /sbin/rpcbind -l $1" + /sbin/rpcbind -l $1 + fi + if ! ps axc | grep -q rpc.statd ; then + echo "Starting RPC NSM (Network Status Monitor): /sbin/rpc.statd" + /sbin/rpc.statd + fi + else + echo "WARNING: Cannot start RPC daemons needed for NFS. One or more of" + echo " these required daemons is not executable or is not present" + echo " on your system:" + echo + echo " /sbin/rpcbind or /sbin/rpc.statd" + echo + fi +} + +rpc_stop() { + killall rpc.statd 2> /dev/null + sleep 1 + killall rpcbind 2> /dev/null + sleep 1 + killall -9 rpc.statd 2> /dev/null # make sure :) + sleep 1 + killall -9 rpcbind 2> /dev/null # make sure :) + sleep 1 +} + +rpc_restart() { + rpc_stop + rpc_start +} + +case "$1" in +'start') + # Warm restart by default (see "man rpcbind" for details about the -w option) + rpc_start -w + ;; +'cold_start') # Start without -w option + rpc_start + ;; +'stop') + rpc_stop + ;; +'restart') + rpc_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac |