diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-01-19 21:47:23 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-01-19 21:47:23 +0000 |
commit | 78f1405de05ef1f2efebafd8245658d1707e59ef (patch) | |
tree | 062f322970f73e19bfdfc65b84d7887a781e92f2 /src/appliance.c | |
parent | 316ad8311a41869cf5f253225137dd03d1211ce7 (diff) | |
download | libguestfs-78f1405de05ef1f2efebafd8245658d1707e59ef.tar.gz libguestfs-78f1405de05ef1f2efebafd8245658d1707e59ef.tar.xz libguestfs-78f1405de05ef1f2efebafd8245658d1707e59ef.zip |
Use /var/tmp for the cached appliance (for FHS compliance).
The FHS advises large files not to be stored in the root
filesystem[1], and that /var/tmp is persistent across reboots[2]
(whereas /tmp is possibly not[3]).
Therefore we should store the large cached supermin appliance in
/var/tmp instead of /tmp. /tmp is still used for all other temporary
files and directories.
In either case you can override this by setting $TMPDIR.
[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#THEROOTFILESYSTEM
[2] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE
[3] http://www.pathname.com/fhs/pub/fhs-2.3.html#TMPTEMPORARYFILES
Diffstat (limited to 'src/appliance.c')
-rw-r--r-- | src/appliance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/appliance.c b/src/appliance.c index 1b6b505e..ef724be5 100644 --- a/src/appliance.c +++ b/src/appliance.c @@ -308,7 +308,7 @@ check_for_cached_appliance (guestfs_h *g, uid_t uid, char **kernel, char **initrd, char **appliance) { - const char *tmpdir = guestfs_tmpdir (); + const char *tmpdir = guestfs___persistent_tmpdir (); /* len must be longer than the length of any pathname we can * generate in this function. @@ -419,7 +419,7 @@ build_supermin_appliance (guestfs_h *g, if (g->verbose) guestfs___print_timestamped_message (g, "begin building supermin appliance"); - const char *tmpdir = guestfs_tmpdir (); + const char *tmpdir = guestfs___persistent_tmpdir (); /* len must be longer than the length of any pathname we can * generate in this function. |