From 1d66ae1f03358b221d67aaf65fbda0ff3c6071fc Mon Sep 17 00:00:00 2001 From: Ferenc Wagner Date: Thu, 17 Jun 2010 18:49:54 +0200 Subject: 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 Signed-off-by: maximilian attems --- scripts/nfs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/nfs') 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" -- cgit v1.2.3