[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] If stage2= is given, it overrides the check for a CD stage2 image.
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] If stage2= is given, it overrides the check for a CD stage2 image.
- Date: Tue, 4 Mar 2008 13:25:33 -0500
---
loader2/hdinstall.c | 10 +++++++---
loader2/nfsinstall.c | 10 +++++++---
loader2/urlinstall.c | 12 ++++++++----
3 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index a5dcb53..7780df6 100644
--- a/loader2/hdinstall.c
+++ b/loader2/hdinstall.c
@@ -59,7 +59,7 @@ static int loadHDImages(char * prefix, char * dir,
char * device, char * mntpoint,
char * location) {
int fd = 0, rc, idx;
- char *path, *target = NULL, *dest, *cdurl;
+ char *path, *target = NULL, *dest, *cdurl = NULL;
char *stg2list[] = {"stage2.img", "minstg2.img", NULL};
path = alloca(50 + strlen(prefix) + (dir ? strlen(dir) : 2));
@@ -69,8 +69,12 @@ static int loadHDImages(char * prefix, char * dir,
else
idx = 0;
- /* try to see if we're booted off of a CD with stage2 */
- cdurl = findAnacondaCD(location, 0);
+ /* Try to see if we're booted off of a CD with stage2. However,
+ * passing stage2= overrides this check.
+ */
+ if (!FL_STAGE2(flags))
+ cdurl = findAnacondaCD(location, 0);
+
if (cdurl) {
logMessage(INFO, "Detected stage 2 image on CD");
winStatus(50, 3, _("Media Detected"),
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index f7d5ff7..a27b003 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -132,7 +132,7 @@ char * mountNfsImage(struct installMethod * method,
case NFS_STAGE_MOUNT: {
int foundinvalid = 0;
char * buf;
- char * cdurl;
+ char * cdurl = NULL;
struct in_addr ip;
if (loaderData->noDns && !(inet_pton(AF_INET, host, &ip))) {
@@ -160,8 +160,12 @@ char * mountNfsImage(struct installMethod * method,
if (!doPwMount(fullPath, "/mnt/source", "nfs", mountOpts)) {
if (!access("/mnt/source/images/stage2.img", R_OK)) {
logMessage(INFO, "can access /mnt/source/images/stage2.img");
- /* try to see if we're booted off of a CD with stage2 */
- cdurl = findAnacondaCD("/mnt/stage2", 0);
+ /* Try to see if we're booted off of a CD with stage2. However,
+ * passing stage2= overrides this check.
+ */
+ if (!FL_STAGE2(flags))
+ cdurl = findAnacondaCD("/mnt/stage2", 0);
+
if (cdurl) {
logMessage(INFO, "Detected stage 2 image on CD");
winStatus(50, 3, _("Media Detected"),
diff --git a/loader2/urlinstall.c b/loader2/urlinstall.c
index 9e91a66..5998cc6 100644
--- a/loader2/urlinstall.c
+++ b/loader2/urlinstall.c
@@ -181,7 +181,7 @@ char * mountUrlImage(struct installMethod * method,
struct iurlinfo ui;
char needsSecondary = ' ';
int dir = 1;
- char * cdurl;
+ char * cdurl = NULL;
enum { URL_STAGE_MAIN, URL_STAGE_SECOND, URL_STAGE_FETCH,
URL_STAGE_DONE } stage = URL_STAGE_MAIN;
@@ -238,9 +238,13 @@ char * mountUrlImage(struct installMethod * method,
break;
}
- /* ok messy - see if we have a stage2 on local CD */
- /* before trying to pull one over network */
- cdurl = findAnacondaCD(location, 0);
+ /* See if we have a stage2 on a local CD before trying to pull
+ * one over the network. However, passing stage2= overrides
+ * this check.
+ */
+ if (!FL_STAGE2(flags))
+ cdurl = findAnacondaCD(location, 0);
+
if (cdurl) {
/* verify that our URL is specifying the correct tree */
/* we do this by attempting to pull a .discinfo file */
--
1.5.3.7
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]