summaryrefslogtreecommitdiffstats
path: root/base/server/upgrade
diff options
context:
space:
mode:
authorFraser Tweedale <frase@frase.id.au>2015-06-15 11:22:17 -0400
committerFraser Tweedale <frase@frase.id.au>2015-06-16 01:38:06 -0400
commitbc72cbf28e1af940762487eb528427a78bb7aa7c (patch)
treedff13f8fd85252549ff461073e154714c85b1da4 /base/server/upgrade
parentc188b7dfb46d188b7c2f7f0a87e5f9a66cb85666 (diff)
downloadpki-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')
-rwxr-xr-xbase/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership3
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)