Juergen Daubert
d64d591e8b
release 2 of nfs-utils 1.3.2 comes with a new set of rc scripts which hopefully improves nfs handling on CRUX. The changes in detail: - seperate run-control scripts for idmapd, statd, mountd and nfsd which are called from the other scripts - idmapd and mountd are behaving more sane now, because they creates pid files in /var/run - nfs is now a rc scripts that includes stuff needed by both nfs-server and -client - the only purpose of nfsclient is to mount/unmount nfs filessystems - nfsserver starts all additional daemons that needs to be run to serve nfs filesystems Note: because of the changes above it's necessary to stop all nfs services before the update and start them again afterwards. Adjustment of /etc/rc.conf is necessary too, possible entries are 'nfs nfsclient', 'nfs nfsserver' or 'nfs nfsserver nfsclient' Please report any problems.
37 lines
649 B
Bash
37 lines
649 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/rpc.idmapd: start/stop idmapd daemon
|
|
#
|
|
|
|
SSD=/sbin/start-stop-daemon
|
|
PROG=/usr/sbin/rpc.idmapd
|
|
PID=/var/run/rpc.idmapd.pid
|
|
OPTS="-f"
|
|
|
|
case $1 in
|
|
start)
|
|
$SSD --start -bm --pidfile $PID --exec $PROG -- $OPTS
|
|
;;
|
|
stop)
|
|
$SSD --stop --remove-pidfile --retry 10 --pidfile $PID
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
status)
|
|
$SSD --status --pidfile $PID
|
|
case $? in
|
|
0) echo "$PROG is running" ;;
|
|
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
|
3) echo "$PROG is not running" ;;
|
|
4) echo "Unable to determine the program status" ;;
|
|
esac
|
|
;;
|
|
*)
|
|
echo "usage: $0 [start|stop|restart|status]"
|
|
;;
|
|
esac
|
|
|
|
# End of file
|