]>
git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/initscripts/init.d/nfs-server
2 # Begin $rc_base/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: bdubbs $
8 #$Date: 2006-09-10 19:41:47 -0500 (Sun, 10 Sep 2006) $
12 .
/var
/ipfire
/nfs
/nfs-server
16 boot_mesg
"Starting NFS mountd..."
17 loadproc
/usr
/sbin
/rpc.mountd
19 boot_mesg
"Starting NFS nfsd..."
20 loadproc
/usr
/sbin
/rpc.nfsd
-p $PORT $PROCESSES
22 boot_mesg
"Starting NFS statd..."
23 loadproc
/usr
/sbin
/rpc.statd
25 if [ "$QUOTAS" = "yes" ]; then
26 boot_mesg
"Starting NFS rquotad..."
27 loadproc
/usr
/sbin
/rpc.rquotad
30 # NFSD support only in 2.6 kernel
31 /bin
/uname
-r |
/bin
/grep "2.6" 2>&1 > /dev
/null
33 boot_mesg
"Mounting nfsd virtual filesystem..."
34 /bin
/mount
-t nfsd none
/proc
/fs
/nfsd
2>&1 > /dev
/null
38 # Make ceratin that the list is refreshed on
40 boot_mesg
"Exporting NFS Filesystems..."
41 /usr
/sbin
/exportfs
-ra 2>&1 > /dev
/null
46 boot_mesg
"Stopping NFS statd..."
47 killproc
/usr
/sbin
/rpc.statd
49 boot_mesg
"Stopping NFS nfsd..."
53 boot_mesg
"Stopping NFS mountd..."
54 killproc
/usr
/sbin
/rpc.mountd
56 if [ "$QUOTAS" = "yes" ]; then
57 boot_mesg
"Stopping NFS rquotad..."
58 killproc
/usr
/sbin
/rpc.rquotad
61 boot_mesg
"Refreshing NFS Exported Filesystems..."
62 /usr
/sbin
/exportfs
-au 2>&1 > /dev
/null
65 # NFSD support only in 2.6 kernel
66 /bin
/uname
-r |
/bin
/grep "2.6" 2>&1 > /dev
/null
68 boot_mesg
"Unmounting NFS Virtual Filesystem..."
69 /bin
/umount
/proc
/fs
/nfsd
2>&1 > /dev
/null
73 # Remove a pid file that isn't done automatically
74 boot_mesg
"Removing the rpc.statd pid file if it exists"
75 if [ -f /var
/run
/rpc.statd.pid
]; then
76 rm -f /var
/run
/rpc.statd.pid
81 boot_mesg
"Reloading NFS Server..."
82 /usr
/sbin
/exportfs
-ra
93 statusproc
/usr
/sbin
/rpc.mountd
94 ## Special case for nfsd with no full path
96 statusproc
/usr
/sbin
/rpc.statd
97 if [ "$QUOTA" = "yes" ]; then
98 statusproc rpc.rquotad
103 echo "Usage: $0 {start|stop|reload|restart|status}"
108 # End $rc_base/init.d/nfs-server