summaryrefslogtreecommitdiffstats
path: root/base/server/upgrade
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2013-10-09 11:40:22 -0400
committerAde Lee <alee@redhat.com>2013-10-09 23:10:25 -0400
commitcdbfab49a928b4194fe8f514bc4053e8105dfb78 (patch)
tree6e68b63f4d3d3fe9dee183bd7141cf2513ac2d71 /base/server/upgrade
parentdfbc59ad7c6b8285b42b249328db3211e00b6a5f (diff)
downloadpki-cdbfab49a928b4194fe8f514bc4053e8105dfb78.tar.gz
pki-cdbfab49a928b4194fe8f514bc4053e8105dfb78.tar.xz
pki-cdbfab49a928b4194fe8f514bc4053e8105dfb78.zip
Add upgrade file for auth.properties
Also moved 10.1 version upgrade scripts to 10.0.99.
Diffstat (limited to 'base/server/upgrade')
-rwxr-xr-xbase/server/upgrade/10.0.99/01-FixJavaOpts (renamed from base/server/upgrade/10.1.0/01-FixJavaOpts)0
-rwxr-xr-xbase/server/upgrade/10.0.99/02-UpdateAuthzProperties45
2 files changed, 45 insertions, 0 deletions
diff --git a/base/server/upgrade/10.1.0/01-FixJavaOpts b/base/server/upgrade/10.0.99/01-FixJavaOpts
index d89f7b425..d89f7b425 100755
--- a/base/server/upgrade/10.1.0/01-FixJavaOpts
+++ b/base/server/upgrade/10.0.99/01-FixJavaOpts
diff --git a/base/server/upgrade/10.0.99/02-UpdateAuthzProperties b/base/server/upgrade/10.0.99/02-UpdateAuthzProperties
new file mode 100755
index 000000000..992b2d518
--- /dev/null
+++ b/base/server/upgrade/10.0.99/02-UpdateAuthzProperties
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+# Authors:
+# Ade Lee <alee@redhat.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2013 Red Hat, Inc.
+# All rights reserved.
+#
+
+import os
+import pki
+import shutil
+import pki.server.upgrade
+
+
+class UpdateAuthzProperties(pki.server.upgrade.PKIServerUpgradeScriptlet):
+
+ def __init__(self):
+ self.message = 'Update auth.properties'
+
+ def upgrade_subsystem(self, instance, subsystem):
+ auth_properties = os.path.join(
+ instance.base_dir,
+ 'webapps', subsystem.name,
+ 'WEB-INF', 'auth.properties')
+
+ self.backup(auth_properties)
+ default_auth_properties = os.path.join(
+ pki.SHARE_DIR, subsystem.name,
+ 'webapps', subsystem.name,
+ 'WEB-INF', 'auth.properties')
+
+ shutil.copyfile(default_auth_properties, auth_properties)