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 > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 02-21-2011, 06:58 PM
Will Woods
 
Default Use /dev/.oldtmp instead of /oldtmp when moving around initrd /tmp

/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
");

- 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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:50 AM.

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