diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-07-08 03:00:53 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-07-08 03:00:53 +0000 |
commit | 459119c94529602d08de465b7ebfa4871d328081 (patch) | |
tree | 369a7eb643938d6d51ef6f2d0c46561e61dcc0ae /loader2/nfsinstall.c | |
parent | 390977d3ee0ebc010168ce04573f63ae15458718 (diff) | |
download | anaconda-459119c94529602d08de465b7ebfa4871d328081.tar.gz anaconda-459119c94529602d08de465b7ebfa4871d328081.tar.xz anaconda-459119c94529602d08de465b7ebfa4871d328081.zip |
massive merge from taroon branch. changes are all over the place, but a
summary of looking through the diff is
* clean up warnings, we build with -Wall -Werror here too
* product.img stuff
* max logical partitions enforcement
* 1 TB max fs size
* ethtool stuff
* autopart in kickstart
* driver disk fixes
* RHEL upgrade stuff
* network driver disks
* variant pkgorder/tree splitting
Diffstat (limited to 'loader2/nfsinstall.c')
-rw-r--r-- | loader2/nfsinstall.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c index aa3324688..1a29a9239 100644 --- a/loader2/nfsinstall.c +++ b/loader2/nfsinstall.c @@ -42,10 +42,10 @@ int nfsGetSetup(char ** hostptr, char ** dirptr) { int rc; entries[0].text = _("NFS server name:"); - entries[0].value = &newServer; + entries[0].value = (const char **) &newServer; entries[0].flags = NEWT_FLAG_SCROLL; entries[1].text = _("Red Hat directory:"); - entries[1].value = &newDir; + entries[1].value = (const char **) &newDir; entries[1].flags = NEWT_FLAG_SCROLL; entries[2].text = NULL; entries[2].value = NULL; @@ -209,7 +209,8 @@ char * mountNfsImage(struct installMethod * method, } -void setKickstartNfs(struct loaderData_s * loaderData, int argc, +void setKickstartNfs(struct knownDevices * kd, + struct loaderData_s * loaderData, int argc, char ** argv, int * flagsPtr) { char * host, * dir; poptContext optCon; @@ -243,14 +244,12 @@ void setKickstartNfs(struct loaderData_s * loaderData, int argc, } -int kickstartFromNfs(char * url, struct knownDevices * kd, - struct loaderData_s * loaderData, int flags) { +int getFileFromNfs(char * url, char * dest, struct knownDevices * kd, + struct loaderData_s * loaderData, int flags) { char * host = NULL, *path = NULL, * file = NULL; int failed = 0; struct networkDeviceConfig netCfg; - logMessage("going to get ks from nfs"); - if (kickstartNetworkUp(kd, loaderData, &netCfg, flags)) { logMessage("unable to bring up network"); return 1; @@ -289,15 +288,15 @@ int kickstartFromNfs(char * url, struct knownDevices * kd, host = sdupprintf("%s/%s", host, path); } - logMessage("ks location: nfs://%s/%s", host, file); + logMessage("file location: nfs://%s/%s", host, file); - if (!doPwMount(host, "/tmp/ks", "nfs", 1, 0, NULL, NULL, 0, 0)) { + if (!doPwMount(host, "/tmp/mnt", "nfs", 1, 0, NULL, NULL, 0, 0)) { char * buf; buf = alloca(strlen(file) + 10); - sprintf(buf, "/tmp/ks/%s", file); - if (copyFile(buf, "/tmp/ks.cfg")) { - logMessage("failed to copy ks.cfg to /tmp/ks.cfg"); + sprintf(buf, "/tmp/mnt/%s", file); + if (copyFile(buf, dest)) { + logMessage("failed to copy file to %s", dest); failed = 1; } @@ -306,8 +305,13 @@ int kickstartFromNfs(char * url, struct knownDevices * kd, failed = 1; } - umount("/tmp/ks"); - unlink("/tmp/ks"); + umount("/tmp/mnt"); + unlink("/tmp/mnt"); return failed; } + +int kickstartFromNfs(char * url, struct knownDevices * kd, + struct loaderData_s * loaderData, int flags) { + return getFileFromNfs(url, "/tmp/ks.cfg", kd, loaderData, flags); +} |