[PATCH] Use /dev/.oldtmp instead of /oldtmp when moving around initrd /tmp

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

 



/dev is definitely a writeable filesystem at this point, so let's
use that for temporary storage rather than assuming that / will
always be writeable.
---
 loader/init.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/loader/init.c b/loader/init.c
index 51ab2a2..6163933 100644
--- a/loader/init.c
+++ b/loader/init.c
@@ -774,7 +774,7 @@ int main(int argc, char **argv) {
     /* we want our /tmp to be tmpfs, but we also want to let people hack
      * their initrds to add things like a ks.cfg, so this has to be a little
      * tricky */
-    rename("/tmp", "/oldtmp");
+    copyDirectory("/tmp", "/dev/.oldtmp", copyErrorFn, copyErrorFn);
     mkdir("/tmp", 0755);
 
     printf("mounting /tmp as tmpfs... ");
@@ -782,8 +782,8 @@ int main(int argc, char **argv) {
         fatal_error(1);
     printf("done\n");
 
-    copyDirectory("/oldtmp", "/tmp", copyErrorFn, copyErrorFn);
-    unlink("/oldtmp");
+    copyDirectory("/dev/.oldtmp", "/tmp", copyErrorFn, copyErrorFn);
+    unlink("/dev/.oldtmp");
 
     /* Now we have some /tmp space set up, and /etc and /dev point to
        it. We should be in pretty good shape. */
-- 
1.7.4

_______________________________________________
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