[pve-devel] [PATCH common 1/3] tempfile: use /run by default
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Nov 2 12:25:49 CET 2016
as /tmp is not a tmpfs by default and some file systems
(like ZFS) don't support O_TMPFILE
---
src/PVE/Tools.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 7ee3450..305e1bf 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -1304,7 +1304,7 @@ sub tempfile {
# default permissions are stricter than with file_set_contents
$perm = 0600 if !defined($perm);
- my $dir = $opts{dir} // '/tmp';
+ my $dir = $opts{dir} // '/run';
my $mode = $opts{mode} // O_RDWR;
$mode |= O_EXCL if !$opts{allow_links};
--
2.1.4
More information about the pve-devel
mailing list