]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/nfs-server
Move all Initscripts of the system, into an extra directory
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / nfs-server
index 397722c1c2967570a6a761077b860e483c391020..a81faf7bba39a2e4f5d16f7ee4347abfc5a91b85 100644 (file)
 
 case "$1" in
        start)
+               boot_mesg "Mounting nfsd virtual filesystem..."
+               /bin/mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null
+               evaluate_retval
+
                boot_mesg "Starting NFS mountd..."
                loadproc /usr/sbin/rpc.mountd
 
@@ -27,14 +31,6 @@ case "$1" in
                        loadproc /usr/sbin/rpc.rquotad
                fi
 
-               # NFSD support only in 2.6 kernel
-               /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
-               if [ $? = 0 ]; then
-                       boot_mesg "Mounting nfsd virtual filesystem..."
-                       /bin/mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null
-                       evaluate_retval
-               fi
-
                # Make ceratin that the list is refreshed on
                # a restart.
                boot_mesg "Exporting NFS Filesystems..."
@@ -47,8 +43,8 @@ case "$1" in
                killproc /usr/sbin/rpc.statd
 
                boot_mesg "Stopping NFS nfsd..."
-               # nfsd needs HUP....
-               killproc nfsd HUP
+               /usr/sbin/rpc.nfsd 0
+               evaluate_retval
 
                boot_mesg "Stopping NFS mountd..."
                killproc /usr/sbin/rpc.mountd
@@ -62,13 +58,9 @@ case "$1" in
                /usr/sbin/exportfs -au 2>&1 > /dev/null
                evaluate_retval
 
-               # NFSD support only in 2.6 kernel
-                /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
-                if [ $? = 0 ]; then
-                       boot_mesg "Unmounting NFS Virtual Filesystem..."
-                       /bin/umount /proc/fs/nfsd 2>&1 > /dev/null
-                       evaluate_retval
-               fi
+               boot_mesg "Unmounting NFS Virtual Filesystem..."
+               /bin/umount /proc/fs/nfsd 2>&1 > /dev/null
+               evaluate_retval
 
                # Remove a pid file that isn't done automatically
                boot_mesg "Removing the rpc.statd pid file if it exists"