From: Victor Lowther Date: Fri, 13 Feb 2009 12:41:42 +0000 (-0800) Subject: [PATCH 05/50] Rewrite the mount loop using bash-specific features. X-Git-Tag: 0.1~473 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0bb3c3613a7b706984f12829892365fa42a404d;p=thirdparty%2Fdracut.git [PATCH 05/50] Rewrite the mount loop using bash-specific features. This makes the loop slightly more compact and easier to read. --- diff --git a/init b/init index 78f962ef1..2ebf1b059 100755 --- a/init +++ b/init @@ -71,13 +71,10 @@ esac # should we have a timeout? tries=0 -while [ ! -e $root ]; do +until [[ -e $root ]]; do echo -n "." sleep 1 - tries=$(($tries + 1)) - if [ $tries -gt 30 ]; then - emergency_shell - fi + ((tries++ > 30)) && emergency_shell done echo -e "\n\nMounting rootfs after $tries seconds" ln -s "$root" /dev/root