Re: [PATCH] Make sure the product.img directory is mounted before copying (#587696).

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 28 May 2010, Chris Lumens wrote:

copyUpdatesImg and copyProductImg require that their argument be mounted and
accessible before the copy is performed.
---
loader/nfsinstall.c |   25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index 660106a..09a2109 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -324,15 +324,22 @@ char * mountNfsImage(struct installMethod * method,

            free(buf);

-            checked_asprintf(&buf, "%s/updates.img", fullPath);
-            logMessage(INFO, "Looking for updates in %s", buf);
-            copyUpdatesImg(buf);
-            free(buf);
-
-            checked_asprintf(&buf, "%s/product.img", fullPath);
-            logMessage(INFO, "Looking for product in %s", buf);
-            copyProductImg(buf);
-            free(buf);
+            if (!doPwMount(fullPath, "/tmp/disk-image", "nfs", mountOpts, NULL)) {
+                logMessage(INFO, "Looking for updates in %s/updates.img", fullPath);
+                checked_asprintf(&buf, "/tmp/disk-image/updates.img");
+                copyUpdatesImg(buf);
+                free(buf);
+
+                logMessage(INFO, "Looking for product in %s/product.img", fullPath);
+                checked_asprintf(&buf, "/tmp/disk-image/product.img");
+                copyProductImg(buf);
+                free(buf);
+
+                umount("/tmp/disk-image");
+                unlink("/tmp/disk-image");
+            } else {
+                logMessage(INFO, "Couldn't mount %s for updates and product", fullPath);
+            }

            stage = NFS_STAGE_DONE;
            break;


Ack.

- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAkwAIcQACgkQ5hsjjIy1Vkn89QCgynIBtgqiWtPPYgdj27NvF11d
JOMAoM4igbMnrLn+AkSTRS/GHRqnmRzA
=Fxyu
-----END PGP SIGNATURE-----

_______________________________________________
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