File: init

package info (click to toggle)
nfs-user-server 2.2beta47-23
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,016 kB
  • ctags: 1,435
  • sloc: ansic: 12,067; sh: 652; makefile: 265
file content (50 lines) | stat: -rw-r--r-- 1,241 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh -e
#
# nfs-user-server	Startup script for the NFS servers.
#
#		Modified for nfs-user-server
#		by Herbert Xu <herbert@debian.org>
#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#		Modified for Debian GNU/Linux
#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#
# Version:	$Id: init,v 1.11 2001/01/24 05:11:59 herbert Exp $

DESC="NFS servers"

test -x /usr/sbin/rpc.nfsd -a -f /etc/exports || exit 0

case "$1" in
start)
	printf "Starting $DESC:"
	start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/rpc.nfsd
	printf " nfsd"
	start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/rpc.mountd
	printf " mountd"
	printf ".\n"
	;;
stop)
	printf "Stopping $DESC:"
	start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/rpc.mountd
	printf " mountd"
	start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/rpc.nfsd
	printf " nfsd"
	printf ".\n"
	;;
reload | force-reload)
	printf "Reloading $DESC' configuration files.\n"
	start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/rpc.mountd
	start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/rpc.nfsd
	;;
restart)
	$0 stop
	sleep 1
	$0 start
	;;
*)
	printf "Usage: $0 {start|stop|restart|reload|force-reload}\n" >&2
	exit 1
	;;
esac

exit 0