Adding upstream version 4.0~a13.
[debian-live-boot.git] / scripts / boot / 9990-mount-nfs.sh
blob6a3ae55c9f26c41cf5be2ea8533c499d56e58807
1 #!/bin/sh
3 #set -e
5 do_nfsmount ()
7 rc=1
9 modprobe -q nfs
11 if [ -n "${NFSOPTS}" ]
12 then
13 NFSOPTS="-o ${NFSOPTS}"
16 log_begin_msg "Trying nfsmount -o nolock -o ro ${NFSOPTS} ${NFSROOT} ${mountpoint}"
18 # FIXME: This while loop is an ugly HACK round an nfs bug
19 i=0
20 while [ "$i" -lt 60 ]
22 nfsmount -o nolock -o ro ${NFSOPTS} "${NFSROOT}" "${mountpoint}" && rc=0 && break
23 sleep 1
24 i="$(($i + 1))"
25 done
27 return ${rc}