summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerenc Wagner <wferi@niif.hu>2010-06-17 18:49:54 +0200
committermaximilian attems <maks@debian.org>2010-06-18 11:43:37 +0200
commit1d66ae1f03358b221d67aaf65fbda0ff3c6071fc (patch)
tree9361d4fe5d5700b32679885555cc336e45eb29f4
parent22d996c1b3bf29e2b665db695414441ec21c7270 (diff)
downloadinitramfs-tools-1d66ae1f03358b221d67aaf65fbda0ff3c6071fc.tar.gz
initramfs-tools-1d66ae1f03358b221d67aaf65fbda0ff3c6071fc.zip
scripts/nfs: cleanup retry logic
The condition of log_end_msg was always true. Calling do_nfsmount before the loop lets us drop two other checks. Signed-off-by: Ferenc Wagner <wferi@niif.hu> Signed-off-by: maximilian attems <maks@debian.org>
-rw-r--r--scripts/nfs8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/nfs b/scripts/nfs
index 5c41573..02b3830 100644
--- a/scripts/nfs
+++ b/scripts/nfs
@@ -69,14 +69,14 @@ mountroot()
delay=${ROOTDELAY}
fi
- # loop until nfsmount succeds
+ # loop until nfsmount succeeds
+ do_nfsmount
while [ ${retry_nr} -lt ${delay} ] && [ ! -e ${rootmnt}${init} ]; do
- [ ${retry_nr} -gt 0 ] && \
[ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount"
+ /bin/sleep 1
do_nfsmount
retry_nr=$(( ${retry_nr} + 1 ))
- [ ! -e ${rootmnt}${init} ] && /bin/sleep 1
- [ ${retry_nr} -gt 0 ] && [ "$quiet" != "y" ] && log_end_msg
+ [ "$quiet" != "y" ] && log_end_msg
done
[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom"