Re: [PATCH 2/2] Fix going back in "Inst. Method" and "Configure TCP/IP" screens in stage 1 (#515450)

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

 



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

Looks good.

On Mon, 24 Aug 2009, Radek Vykydal wrote:

Going back from method screen was broken with commit
245d1951c40ecb61cee11f3ecc00e483bc8dd142. This patch implements Retry flow
differently - by staying on the Configure TCP/IP screen instead of going there
through hacked (skipped) method screen. The interface can still be changed by
going Back from Configure TCP/IP which is fixed in this patch too.
---
loader/loader.c |   17 ++++++++++++++---
loader/net.c    |    2 +-
2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index 3855ccc..713b538 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1387,10 +1387,12 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
                                       "image?"),
                                     30, 10, 20, 6, installNames, &loaderData->method,
                                     _("OK"), _("Back"), NULL);
+                    if (rc == 2) {
+                        loaderData->method = -1;
+                    }
                }

-                if (rc && (rc != 1) && (loaderData->method == -1)) {
-                    loaderData->method = -1;
+                if (rc && (rc != 1)) {
                    step = STEP_KBD;
                    dir = -1;
                } else {
@@ -1504,6 +1506,10 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
                rc = chooseNetworkInterface(loaderData);
                if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) ||
                    ((dir == -1) && (rc == LOADER_NOOP))) {
+                    /* don't skip method dialog iff we don't have url from ks or boot params */
+                    if (!loaderData->stage2Data) {
+                        loaderData->method = -1;
+                    }
                    step = STEP_METHOD;
                    dir = -1;
                    break;
@@ -1555,13 +1561,18 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
                free(ret);
                ret = NULL;

-                if ((rc == LOADER_BACK) || (rc == LOADER_ERROR) ||
+                if ((rc == LOADER_BACK) ||
                    ((dir == -1) && (rc == LOADER_NOOP))) {
                    needsNetwork = 1;
                    step = STEP_IFACE;
                    dir = -1;
                    break;
                }
+                /* retry */
+                if (rc == LOADER_ERROR) {
+                    needsNetwork = 1;
+                    break;
+                }

                writeEnabledNetInfo(&iface);
                step = STEP_STAGE2;
diff --git a/loader/net.c b/loader/net.c
index 3df2acf..397b1a8 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -522,7 +522,7 @@ int readNetConfig(char * device, iface_t * iface,
                             "interface."));
            iface->ipv4method = IPV4_UNUSED_METHOD;
            iface->ipv6method = IPV6_UNUSED_METHOD;
-            return LOADER_BACK;
+            return LOADER_ERROR;
        }
    }



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

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

iEYEARECAAYFAkqTG/kACgkQ5hsjjIy1Vkm8IACdGF86FWpr92687F1PwkHAbphE
Q/wAoOUOUOuYiYGa4M6+0a3quRBFSTtc
=iBaI
-----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