$i can be polluted too easily
getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break mount"
# mount scripts actually try to mount the root filesystem, and may
# be sourced any number of times. As soon as one suceeds, no more are sourced.
-i=0
+_i_mount=0
while :; do
if ismounted "$NEWROOT"; then
usable_root "$NEWROOT" && break;
fi
done
- i=$(($i+1))
- [ $i -gt 20 ] \
+ _i_mount=$(($_i_mount+1))
+ [ $_i_mount -gt 20 ] \
&& { flock -s 9 ; action_on_fail "Can't mount root filesystem" && break; } 9>/.console_lock
done