Re: [PATCH 3/5] rescue.py: Put our mount / rw, ro, skip question in a loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ack.

On Wed, 14 Apr 2010, Hans de Goede wrote:

This is a preparation patch for adding advanced storage support to
rescue mode. This patch does nothing but indent the entire question
block, add a "while True:" at the top and a break at the bottom.
---
rescue.py |   42 ++++++++++++++++++++++--------------------
1 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/rescue.py b/rescue.py
index 26598bf..a98fda8 100644
--- a/rescue.py
+++ b/rescue.py
@@ -281,26 +281,28 @@ def runRescue(anaconda):
    else:
        # prompt to see if we should try and find root filesystem and mount
        # everything in /etc/fstab on that root
-        rc = ButtonChoiceWindow(screen, _("Rescue"),
-            _("The rescue environment will now attempt to find your "
-              "Linux installation and mount it under the directory "
-              "%s.  You can then make any changes required to your "
-              "system.  If you want to proceed with this step choose "
-              "'Continue'.  You can also choose to mount your file systems "
-              "read-only instead of read-write by choosing 'Read-Only'."
-              "\n\n"
-              "If for some reason this process fails you can choose 'Skip' "
-              "and this step will be skipped and you will go directly to a "
-              "command shell.\n\n") % (anaconda.rootPath,),
-              [_("Continue"), _("Read-Only"), _("Skip")] )
-
-        if rc == string.lower(_("Skip")):
-            runShell(screen)
-            sys.exit(0)
-        elif rc == string.lower(_("Read-Only")):
-            readOnly = 1
-        else:
-            readOnly = 0
+        while True:
+            rc = ButtonChoiceWindow(screen, _("Rescue"),
+                _("The rescue environment will now attempt to find your "
+                  "Linux installation and mount it under the directory "
+                  "%s.  You can then make any changes required to your "
+                  "system.  If you want to proceed with this step choose "
+                  "'Continue'.  You can also choose to mount your file systems "
+                  "read-only instead of read-write by choosing 'Read-Only'."
+                  "\n\n"
+                  "If for some reason this process fails you can choose 'Skip' "
+                  "and this step will be skipped and you will go directly to a "
+                  "command shell.\n\n") % (anaconda.rootPath,),
+                  [_("Continue"), _("Read-Only"), _("Skip")] )
+
+            if rc == string.lower(_("Skip")):
+                runShell(screen)
+                sys.exit(0)
+            elif rc == string.lower(_("Read-Only")):
+                readOnly = 1
+            else:
+                readOnly = 0
+            break

    import storage
    storage.storageInitialize(anaconda)


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvGJKkACgkQ5hsjjIy1VklpsQCgmiso1bhLtZiN+oNPCewsUOyA
ScEAn3Jki6ZWjZoXd167PP3EivKDC8xa
=sxpP
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux