#! /bin/sh # Copyright (c) 1996 S.u.S.E. GmbH Fuerth, Germany. All rights reserved. # # Author: Florian La Roche , 1996 # Werner Fink , 1996 # Burchard Steinbild , 1996 # # /sbin/init.d/nfs # . /etc/rc.config nfs=no while read where what type rest ; do if test "$type" = "nfs" ; then nfs=yes break fi done < /etc/fstab case "$1" in start) test "$nfs" = "yes" || exit 0; echo "Importing Net File System (NFS)." # Mount all auto NFS devices (-> nfs(5) and mount(8) ) # NFS-Server sometime not reachable during boot phase. # It's sometime usefull to mount NFS devices in # background with an ampersand (&) and a sleep time of # two or more seconds, e.g: # # mount -at nfs & # sleep 2 # # Note: Some people importing the /usr partition. # Therefore we do _NOT_ use an ampersand! # mount -at nfs sleep 1 # # generate new list of available shared libraries # ldconfig -X 2>/dev/null ;; stop) test "$nfs" = "yes" && echo "Remove Net File System (NFS)." # # Unmount in background because during long timeouts # sleep 1 umount -at nfs & sleep 1 ;; *) echo "Usage: $0 {start|stop}" exit 1 esac exit 0