diff options
author | Fraser Tweedale <frase@frase.id.au> | 2015-06-15 11:22:17 -0400 |
---|---|---|
committer | Fraser Tweedale <frase@frase.id.au> | 2015-06-16 01:38:06 -0400 |
commit | bc72cbf28e1af940762487eb528427a78bb7aa7c (patch) | |
tree | dff13f8fd85252549ff461073e154714c85b1da4 /base/server/upgrade/10.2.3 | |
parent | c188b7dfb46d188b7c2f7f0a87e5f9a66cb85666 (diff) | |
download | pki-bc72cbf28e1af940762487eb528427a78bb7aa7c.tar.gz pki-bc72cbf28e1af940762487eb528427a78bb7aa7c.tar.xz pki-bc72cbf28e1af940762487eb528427a78bb7aa7c.zip |
Upgrade: check file exists before chowning
Dogtag entered a state where an upgrade script failed before it was
trying to chown a file that didn't exist. Add a check that the file
exists.
Diffstat (limited to 'base/server/upgrade/10.2.3')
-rwxr-xr-x | base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership b/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership index 700aaf3ce..686853c29 100755 --- a/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership +++ b/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership @@ -31,4 +31,5 @@ class FixInstanceWorkFolderOwnership(pki.server.upgrade.PKIServerUpgradeScriptle def upgrade_instance(self, instance): dir = os.path.join(instance.base_dir, 'work/Catalina/localhost/pki') - pki.util.chown(dir, instance.uid, instance.gid) + if os.path.exists(dir): + pki.util.chown(dir, instance.uid, instance.gid) |