[pve-devel] [PATCH common 1/3] tempfile: use /run by default

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Nov 2 12:28:25 CET 2016


Fixes #1188

On Wed, Nov 02, 2016 at 12:25:49PM +0100, Wolfgang Bumiller wrote:
> 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
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list