Re: [PATCH] Don't skip method selection if using media with no packages (#611154).

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

 



Ack.

On Mon, 19 Jul 2010, Chris Lumens wrote:

Combined with removing "askmethod" from the boot arguments in scripts/, this
should make it so that booting with boot.iso or pxeboot will still prompt for
the installation method while all other ways of booting will continue as
intended.

By checking for stage2 on media this early, the url variable gets set.  If the
media also does not contain packages, method and skipMethodDialog will be unset.
Therefore STEP_METHOD will get run.  However, STEP_METHOD only sets method.
url remains set to whatever we found earlier.  So, STEP_STAGE2 will bail out
early.

The end result is that we use the stage2 from the boot media but refer to the
method given in the UI for the installation source.
---
loader/loader.c |   23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index 46f6f5e..2ebe2a2 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1246,14 +1246,21 @@ static char *doLoaderMain(struct loaderData_s *loaderData,
    if (!FL_ASKMETHOD(flags)) {
        url = findAnacondaCD("/mnt/stage2");
        if (url) {
-            setStage2LocFromCmdline(url, loaderData);
-            skipMethodDialog = 1;
+            /* This is specific to RHEL, which does not have the mirror system
+             * set up like Fedora does.  If the CD/DVD doesn't have packages,
+             * then it's a boot.iso and we still need to prompt for the
+             * installation source.
+             */
+            if (!access("/mnt/stage2/.discinfo", R_OK)) {
+                setStage2LocFromCmdline(url, loaderData);
+                skipMethodDialog = 1;

-            logMessage(INFO, "Detected stage 2 image on CD (url: %s)", url);
-            winStatus(50, 3, _("Media Detected"),
-                      _("Found local installation media"), 0);
-            sleep(3);
-            newtPopWindow();
+                logMessage(INFO, "Detected stage 2 image on CD (url: %s)", url);
+                winStatus(50, 3, _("Media Detected"),
+                          _("Found local installation media"), 0);
+                sleep(3);
+                newtPopWindow();
+            }

            skipLangKbd = 1;
            flags |= LOADER_FLAGS_NOPASS;


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

_______________________________________________
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