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

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



On Mon, Feb 21, 2011 at 02:58:10PM -0500, Will Woods wrote:
> /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

If you must :) Ack.


-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

Attachment: pgpkr9WThEPRG.pgp
Description: PGP signature


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