mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-27 00:55:34 +03:00
[PATCH 05/50] Rewrite the mount loop using bash-specific features.
This makes the loop slightly more compact and easier to read.
This commit is contained in:
parent
f9a0b9f868
commit
e0bb3c3613
7
init
7
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
|
||||
|
Loading…
Reference in New Issue
Block a user