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