Blame SOURCES/0190-base-init.sh-use-loop-counter-with-unique-varname.patch

18971c
From ef6665ec410fe89af700e3257942083f4ea629a8 Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Fri, 27 Jun 2014 18:05:37 +0200
18971c
Subject: [PATCH] base/init.sh: use loop counter with unique varname
18971c
18971c
$i can be polluted too easily
18971c
18971c
(cherry picked from commit 6525182bfc06abfffd71dafc06c5faca6c55eace)
18971c
---
18971c
 modules.d/99base/init.sh | 6 +++---
18971c
 1 file changed, 3 insertions(+), 3 deletions(-)
18971c
18971c
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
18971c
index 9ee3e9dc..dcc62d2a 100755
18971c
--- a/modules.d/99base/init.sh
18971c
+++ b/modules.d/99base/init.sh
18971c
@@ -231,7 +231,7 @@ source_hook pre-mount
18971c
 getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break mount"
18971c
 # mount scripts actually try to mount the root filesystem, and may
18971c
 # be sourced any number of times. As soon as one suceeds, no more are sourced.
18971c
-i=0
18971c
+_i_mount=0
18971c
 while :; do
18971c
     if ismounted "$NEWROOT"; then
18971c
         usable_root "$NEWROOT" && break;
18971c
@@ -247,8 +247,8 @@ while :; do
18971c
         fi
18971c
     done
18971c
 
18971c
-    i=$(($i+1))
18971c
-    [ $i -gt 20 ] \
18971c
+    _i_mount=$(($_i_mount+1))
18971c
+    [ $_i_mount -gt 20 ] \
18971c
         && { flock -s 9 ; action_on_fail "Can't mount root filesystem" && break; } 9>/.console_lock
18971c
 done
18971c