FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-13-2010, 03:11 PM
Chris Lumens
 
Default Initialize loaderData->method.

First set it to METHOD_URL since that's what the UI defaults to. Then if
we're given a repo= parameter, set it there. Otherwise, we will end up in
situations where NFS installs attempt to fetch updates.img and product.img
via HTTP.
---
loader/loader.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index 894e6c7..221be0c 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1078,6 +1078,19 @@ static void parseCmdLineFlags(struct loaderData_s * loaderData,
} else if (!strcasecmp(k, "stage2")) {
logMessage(WARNING, "stage2= is deprecated. Please use repo= instead.");
flags |= LOADER_FLAGS_ASKMETHOD;
+ } else if (!strcasecmp(k, "repo")) {
+ loaderData->instRepo = g_strdup(v);
+
+ /* We still have to set the method in case repo= was used so we
+ * know how to get updates.img and product.img, and it only
+ * gets set elsewhere on interactive installs.
+ */
+ if (!strncmp(v, "nfs:", 4))
+ loaderData->method = METHOD_NFS;
+ else if (!strncmp(v, "hd:", 3))
+ loaderData->method = METHOD_HD;
+ else if (!strncmp(v, "cd:", 3))
+ loaderData->method = METHOD_CDROM;
} else if (!strcasecmp(k, "hostname")) {
loaderData->hostname = g_strdup(v);
} else if (!strcasecmp(k, "ip")) {
@@ -1881,7 +1894,7 @@ int main(int argc, char ** argv) {
}

memset(&loaderData, 0, sizeof(loaderData));
- loaderData.method = -1;
+ loaderData.method = METHOD_URL;
loaderData.fw_loader_pid = -1;
loaderData.fw_search_pathz_len = -1;
loaderData.dhcpTimeout = -1;
--
1.7.1.1

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

Thread Tools




All times are GMT. The time now is 09:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org