create directory for upgraded versio early as a locking mechanism

This commit is contained in:
Joey Hess 2013-11-24 15:03:50 -04:00
parent 5ff5d0a854
commit 95feec24d1
2 changed files with 78 additions and 41 deletions

View file

@ -46,4 +46,7 @@ should notice the upgrade and restart.
I don't want every daemon trying to download the file at once..
TODO Add locking to prevent that.
Approach: The first new version is installed into a stable directory, based
on its version. So, start the upgrade by making this directory. If upgrade
is already in progress, the directory will already exist. (Remove directory
if upgrade fails.)