[PATCH 05/50] Rewrite the mount loop using bash-specific features.

This makes the loop slightly more compact and easier to read.
master
Victor Lowther 2009-02-13 04:41:42 -08:00 committed by Dave Jones
parent f9a0b9f868
commit e0bb3c3613
1 changed files with 2 additions and 5 deletions

7
init
View File

@ -71,13 +71,10 @@ esac


# should we have a timeout? # should we have a timeout?
tries=0 tries=0
while [ ! -e $root ]; do until [[ -e $root ]]; do
echo -n "." echo -n "."
sleep 1 sleep 1
tries=$(($tries + 1)) ((tries++ > 30)) && emergency_shell
if [ $tries -gt 30 ]; then
emergency_shell
fi
done done
echo -e "\n\nMounting rootfs after $tries seconds" echo -e "\n\nMounting rootfs after $tries seconds"
ln -s "$root" /dev/root ln -s "$root" /dev/root