[pve-devel] [PATCH pve-client 1/2] Lock the config file in /var/lock

René Jochum r.jochum at proxmox.com
Tue Jun 19 16:47:57 CEST 2018


Ok, will switch to the same directory as the config file itself and make
it hidden.
Will also incorporate your suggestions.

On 2018-06-19 16:45, Dietmar Maurer wrote:
>>> diff --git a/PVE/APIClient/Config.pm b/PVE/APIClient/Config.pm
>>> index a4aa4c6..6f9f332 100644
>>> --- a/PVE/APIClient/Config.pm
>>> +++ b/PVE/APIClient/Config.pm
>>> @@ -64,10 +64,18 @@ sub config_filename {
>>>      return "$dir/config";
>>>  }
>>>  
>>> +sub config_lock_filename {
>>> +    my ($class) = @_;
>>> +
>>> +    return "/var/lock/pveclient/config.lck";
>> After a short offlist-talk I checked various OS installs for their take
>> at /var/lock - and in most (Arch, Alpine(container from pveam),
>> Free/OpenBSD) the directory is only writable by root (and by group
>> uucp on alpine...), if it exists at all (does not on BSD).
>> IMHO it may be more portable to create the lockfile next to the actual
>> configfile.
> Yes, maybe just use the same directory. But I would prefer to hide the file
> by default (".config.lck")?




More information about the pve-devel mailing list