]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/init.d/nfs-server
2 # Begin /etc/init.d/nfs-server
4 # Based on sysklogd script from LFS-3.1 and earlier.
5 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
7 #$LastChangedBy: randy $
8 #$Date: 2006-04-29 22:26:35 -0500 (Sat, 29 Apr 2006) $
10 .
/etc
/init.d
/init-functions
11 .
/var
/ipfire
/nfs
/nfs-server
15 boot_mesg
"Starting NFS mountd..."
16 loadproc
/usr
/sbin
/rpc.mountd
18 boot_mesg
"Starting NFS nfsd..."
19 loadproc
/usr
/sbin
/rpc.nfsd
-p $PORT $PROCESSES
21 boot_mesg
"Starting NFS statd..."
22 loadproc
/usr
/sbin
/rpc.statd
24 if [ "$QUOTAS" = "yes" ]; then
25 boot_mesg
"Starting NFS rquotad..."
26 loadproc
/usr
/sbin
/rpc.rquotad
29 # NFSD support only in 2.6 kernel
30 /bin
/uname
-r |
/bin
/grep "2.6" 2>&1 > /dev
/null
32 boot_mesg
"Mounting nfsd virtual filesystem..."
33 /bin
/mount
-t nfsd none
/proc
/fs
/nfsd
2>&1 > /dev
/null
37 # Make ceratin that the list is refreshed on
39 boot_mesg
"Exporting NFS Filesystems..."
40 /usr
/sbin
/exportfs
-ra 2>&1 > /dev
/null
45 boot_mesg
"Stopping NFS statd..."
46 killproc
/usr
/sbin
/rpc.statd
48 boot_mesg
"Stopping NFS nfsd..."
50 TEMPSTOPSIG
="$STOPSIG"
52 ## Special case for nfsd with no full path
54 # return STOPSIG to it's orginal value...
55 STOPSIG
="$TEMPSTOPSIG"
57 boot_mesg
"Stopping NFS mountd..."
58 killproc
/usr
/sbin
/rpc.mountd
60 if [ "$QUOTAS" = "yes" ]; then
61 boot_mesg
"Stopping NFS rquotad..."
62 killproc
/usr
/sbin
/rpc.rquotad
65 boot_mesg
"Refreshing NFS Exported Filesystems..."
66 /usr
/sbin
/exportfs
-au 2>&1 > /dev
/null
69 # NFSD support only in 2.6 kernel
70 /bin
/uname
-r |
/bin
/grep "2.6" 2>&1 > /dev
/null
72 boot_mesg
"Unmounting NFS Virtual Filesystem..."
73 /bin
/umount
/proc
/fs
/nfsd
2>&1 > /dev
/null
77 # Remove a pid file that isn't done automatically
78 boot_mesg
"Removing the rpc.statd pid file if it exists"
79 if [ -f /var
/run
/rpc.statd.pid
]; then
80 rm -f /var
/run
/rpc.statd.pid
85 boot_mesg
"Reloading NFS Server..."
86 /usr
/sbin
/exportfs
-ra
97 statusproc
/usr
/sbin
/rpc.mountd
98 ## Special case for nfsd with no full path
100 statusproc
/usr
/sbin
/rpc.statd
101 if [ "$QUOTA" = "yes" ]; then
102 statusproc rpc.rquotad
107 echo "Usage: $0 {start|stop|reload|restart|status}"
112 # End /etc/init.d/nfs-server