diff options
author | Endi S. Dewata <edewata@redhat.com> | 2015-05-09 03:21:57 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2015-05-11 10:20:41 -0400 |
commit | f1dec6488cfb1cf883fccd6fd3aa148bb1077776 (patch) | |
tree | 4206f427f9fda48594e8e5d866ad7e4f77746dee /base/server/upgrade/10.2.2 | |
parent | 6ee510efe491b1e2afd7e9901eee690365fd8bbb (diff) | |
download | pki-f1dec6488cfb1cf883fccd6fd3aa148bb1077776.tar.gz pki-f1dec6488cfb1cf883fccd6fd3aa148bb1077776.tar.xz pki-f1dec6488cfb1cf883fccd6fd3aa148bb1077776.zip |
Refactored upgrade scripts.
The upgrade scripts have been modified to use the uid and gid
provided by PKIInstance object.
https://fedorahosted.org/pki/ticket/1341
Diffstat (limited to 'base/server/upgrade/10.2.2')
-rwxr-xr-x | base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations b/base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations index 20f35e837..2a1ec99d7 100755 --- a/base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations +++ b/base/server/upgrade/10.2.2/01-MoveWebApplicationDeploymentLocations @@ -19,9 +19,7 @@ # All rights reserved. # -import grp import os -import pwd import shutil import signal import sys @@ -52,10 +50,7 @@ class MoveWebApplicationDeploymentLocations(pki.server.upgrade.PKIServerUpgradeS if not os.path.exists(subsystem_webapps): os.mkdir(subsystem_webapps) - uid = pwd.getpwnam('pkiuser').pw_uid - gid = grp.getgrnam('pkiuser').gr_gid - - os.chown(subsystem_webapps, uid, gid) + os.chown(subsystem_webapps, instance.uid, instance.gid) os.chmod(subsystem_webapps, 0770) # move subsystem webapp @@ -74,10 +69,7 @@ class MoveWebApplicationDeploymentLocations(pki.server.upgrade.PKIServerUpgradeS if not os.path.exists(common_webapps): os.mkdir(common_webapps) - uid = pwd.getpwnam('pkiuser').pw_uid - gid = grp.getgrnam('pkiuser').gr_gid - - os.chown(common_webapps, uid, gid) + os.chown(common_webapps, instance.uid, instance.gid) os.chmod(common_webapps, 0770) # move ROOT webapp |