[PATCH] Add support for RHupdates back in, the easy way.

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

 



---
 loader2/nfsinstall.c |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index fe1fae9..4ba3d29 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -30,6 +30,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "copy.h"
 #include "loader.h"
 #include "lang.h"
 #include "loadermisc.h"
@@ -91,8 +92,8 @@ char * mountNfsImage(struct installMethod * method,
     char * fullPath = NULL;
     char * url = NULL;
 
-    enum { NFS_STAGE_NFS, NFS_STAGE_MOUNT, 
-           NFS_STAGE_DONE } stage = NFS_STAGE_NFS;
+    enum { NFS_STAGE_NFS, NFS_STAGE_MOUNT, NFS_STAGE_DONE,
+           NFS_STAGE_UPDATES } stage = NFS_STAGE_NFS;
 
     int rc, foundinvalid = 0;
 
@@ -179,7 +180,7 @@ char * mountNfsImage(struct installMethod * method,
                         umount("/mnt/stage2");
                         free(buf);
                     } else if (rc == 0) {
-                        stage = NFS_STAGE_DONE;
+                        stage = NFS_STAGE_UPDATES;
                         rc = asprintf(&url, "nfs:%s:%s", host, directory);
                         free(buf);
                         break;
@@ -221,6 +222,27 @@ char * mountNfsImage(struct installMethod * method,
             break;
         }
 
+        case NFS_STAGE_UPDATES: {
+            char *buf;
+            int rc;
+
+            rc = asprintf(&buf, "%.*s/RHupdates", (int) (strrchr(fullPath, '/')-fullPath),
+                          fullPath);
+            logMessage(INFO, "mounting nfs path %s for updates", buf);
+
+            if (!doPwMount(buf, "/tmp/update-disk", "nfs", mountOpts)) {
+                logMessage(INFO, "Using RHupdates/ for NFS install");
+                copyDirectory("/tmp/update-disk", "/tmp/updates", NULL, NULL);
+                umount("/tmp/update-disk");
+                unlink("/tmp/update-disk");
+            } else {
+                logMessage(INFO, "No RHupdates/ directory found, skipping");
+            }
+
+            stage = NFS_STAGE_DONE;
+            break;
+        }
+
         case NFS_STAGE_DONE:
             break;
         }
-- 
1.5.5.1

_______________________________________________
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