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 > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 12-22-2011, 04:22 PM
Mark Hamzy
 
Default Reprompt for network configuration if error during NFS install

For https://bugzilla.redhat.com/show_bug.cgi?id=758450 , the following is the proposed patch.
Comments?

---
loader/loader.c | 15 +++++++++++++++
loader/net.c | 3 +++
loader/nfsinstall.c | 3 ++-
3 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/loader/loader.c b/loader/loader.c
index c60795f..ba85734 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1441,6 +1441,21 @@ static void doLoaderMain(struct loaderData_s *loaderData,
if (rc == LOADER_BACK)
break;

+ if (rc == LOADER_ERROR) {
+ needsNetwork = 1;
+
+ /* Don't retry the same failed settings. Clear ipinfo-set
+ * so the user can enter new data */
+ loaderData->ipinfo_set = 0;
+#ifdef ENABLE_IPV6
+ loaderData->ipv6info_set = 0;
+#endif
+ loaderData->netDev_set = 0;
+ logMessage(DEBUGLVL, "in STEP_METHOD, retry (LOADER_ERROR)");
+
+ break;
+ }
+
class = installMethods[validMethods[loaderData->method]].type;
step = STEP_DRIVER;
dir = 1;
diff --git a/loader/net.c b/loader/net.c
index d556554..31d8205 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -655,6 +655,8 @@ int configureTCPIP(char * device, iface_t * iface,
#endif

#ifdef ENABLE_IPV6
+ logMessage(DEBUGLVL, "in configureTCPIP() iface->ipv4method = %d, FL_NOIPV4(flags) = %ld", iface->ipv4method, FL_NOIPV4(flags));
+ logMessage(DEBUGLVL, "in configureTCPIP() iface->ipv6method = %d, FL_NOIPV6(flags) = %ld", iface->ipv6method, FL_NOIPV6(flags));
/* If the user provided any of the following boot paramters, skip
* prompting for network configuration information:
* ip=<val> ipv6=<val>
@@ -671,6 +673,7 @@ int configureTCPIP(char * device, iface_t * iface,
logMessage(DEBUGLVL, "in configureTCPIP(), detected network boot args, skipping form");
}
#else
+ logMessage(DEBUGLVL, "in configureTCPIP() iface->ipv4method = %d, FL_NOIPV4(flags) = %ld", iface->ipv4method, FL_NOIPV4(flags));
if (iface->ipv4method > IPV4_UNUSED_METHOD || FL_NOIPV4(flags)) {
skipForm = 1;
newtPopWindow();
diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index f46e79e..f02ab16 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -257,7 +257,8 @@ int promptForNfs(struct loaderData_s *loaderData) {
newtWinMessage(_("Error"), _("OK"),
_("The URL provided does not contain an installable tree."));
free(url);
- continue;
+ loaderData->instRepo = NULL;
+ return LOADER_ERROR;
}

free(url);
--
1.7.7.3

_______________________________________________
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 11:30 PM.

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