Add back persistance fsck option
[live-boot-grml.git] / components / 9990-mount-nfs.sh
1 #!/bin/sh
2
3 #set -e
4
5 do_nfsmount ()
6 {
7         rc=1
8
9         modprobe -q nfs
10
11         if [ -n "${NFSOPTS}" ]
12         then
13                 NFSOPTS="-o ${NFSOPTS}"
14         fi
15
16         log_begin_msg "Trying nfsmount -o nolock -o ro ${NFSOPTS} ${NFSROOT} ${mountpoint}"
17
18         # FIXME: This while loop is an ugly HACK round an nfs bug
19         i=0
20         while [ "$i" -lt 60 ]
21         do
22                 nfsmount -o nolock -o ro ${NFSOPTS} "${NFSROOT}" "${mountpoint}" && rc=0 && break
23                 sleep 1
24                 i="$(($i + 1))"
25         done
26
27         return ${rc}
28 }