summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/deploy/src/scriptlets/instance_layout.py164
-rwxr-xr-xbase/setup/pkicreate33
2 files changed, 192 insertions, 5 deletions
diff --git a/base/deploy/src/scriptlets/instance_layout.py b/base/deploy/src/scriptlets/instance_layout.py
index 219f049c8..b4d1a5068 100644
--- a/base/deploy/src/scriptlets/instance_layout.py
+++ b/base/deploy/src/scriptlets/instance_layout.py
@@ -71,12 +71,90 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
util.directory.create(master['pki_tomcat_tmpdir_path'])
util.directory.create(master['pki_tomcat_webapps_path'])
util.directory.create(master['pki_tomcat_webapps_common_path'])
+
+ common_images = os.path.join(
+ master['pki_tomcat_webapps_common_path'],
+ "images")
+
+ # Copy /usr/share/pki/common-ui/admin/console/img
+ # to <instance>/webapp/pki/images
util.directory.copy(
os.path.join(
config.PKI_DEPLOYMENT_SOURCE_ROOT,
- "common-ui"),
- master['pki_tomcat_webapps_common_path'],
+ "common-ui",
+ "admin",
+ "console",
+ "img"),
+ common_images,
overwrite_flag=True)
+
+ # Copy /usr/share/pki/common-ui/css
+ # to <instance>/webapp/pki/css
+ util.directory.copy(
+ os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ "common-ui",
+ "css"),
+ os.path.join(
+ master['pki_tomcat_webapps_common_path'],
+ "css"),
+ overwrite_flag=True)
+
+ # Copy /usr/share/pki/common-ui/img
+ # to <instance>/webapp/pki/images
+ util.directory.copy(
+ os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ "common-ui",
+ "img"),
+ common_images,
+ overwrite_flag=True)
+
+ # Copy /usr/share/pki/<subsystem>-ui/webapps/<subsystem>/admin/graphics
+ # to <instance>/webapp/pki/images
+ dir = os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ master['pki_subsystem'].lower() + "-ui",
+ "webapps",
+ master['pki_subsystem'].lower(),
+ "admin",
+ "graphics")
+ if (util.directory.exists(dir)):
+ util.directory.copy(
+ dir,
+ common_images,
+ overwrite_flag=True)
+
+ # Copy /usr/share/pki/<subsystem>-ui/webapps/<subsystem>/agent/graphics
+ # to <instance>/webapp/pki/images
+ dir = os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ master['pki_subsystem'].lower() + "-ui",
+ "webapps",
+ master['pki_subsystem'].lower(),
+ "agent",
+ "graphics")
+ if (util.directory.exists(dir)):
+ util.directory.copy(
+ dir,
+ common_images,
+ overwrite_flag=True)
+
+ # Copy /usr/share/pki/<subsystem>-ui/webapps/<subsystem>/ee/graphics
+ # to <instance>/webapp/pki/images
+ dir = os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ master['pki_subsystem'].lower() + "-ui",
+ "webapps",
+ master['pki_subsystem'].lower(),
+ "ee",
+ "graphics")
+ if (util.directory.exists(dir)):
+ util.directory.copy(
+ dir,
+ common_images,
+ overwrite_flag=True)
+
util.directory.create(master['pki_tomcat_webapps_root_path'])
util.directory.copy(
os.path.join(
@@ -180,12 +258,90 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
util.directory.modify(master['pki_instance_lib'])
util.directory.modify(master['pki_instance_lib_log4j_properties'])
util.directory.modify(master['pki_tomcat_webapps_path'])
+
+ common_images = os.path.join(
+ master['pki_tomcat_webapps_common_path'],
+ "images")
+
+ # Copy /usr/share/pki/common-ui/admin/console/img
+ # to <instance>/webapp/pki/images
util.directory.copy(
os.path.join(
config.PKI_DEPLOYMENT_SOURCE_ROOT,
- "common-ui"),
- master['pki_tomcat_webapps_common_path'],
+ "common-ui",
+ "admin",
+ "console",
+ "img"),
+ common_images,
overwrite_flag=True)
+
+ # Copy /usr/share/pki/common-ui/css
+ # to <instance>/webapp/pki/css
+ util.directory.copy(
+ os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ "common-ui",
+ "css"),
+ os.path.join(
+ master['pki_tomcat_webapps_common_path'],
+ "css"),
+ overwrite_flag=True)
+
+ # Copy /usr/share/pki/common-ui/img
+ # to <instance>/webapp/pki/images
+ util.directory.copy(
+ os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ "common-ui",
+ "img"),
+ common_images,
+ overwrite_flag=True)
+
+ # Copy /usr/share/pki/<subsystem>-ui/webapps/<subsystem>/admin/graphics
+ # to <instance>/webapp/pki/images
+ dir = os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ master['pki_subsystem'].lower() + "-ui",
+ "webapps",
+ master['pki_subsystem'].lower(),
+ "admin",
+ "graphics")
+ if (util.directory.exists(dir)):
+ util.directory.copy(
+ dir,
+ common_images,
+ overwrite_flag=True)
+
+ # Copy /usr/share/pki/<subsystem>-ui/webapps/<subsystem>/agent/graphics
+ # to <instance>/webapp/pki/images
+ dir = os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ master['pki_subsystem'].lower() + "-ui",
+ "webapps",
+ master['pki_subsystem'].lower(),
+ "agent",
+ "graphics")
+ if (util.directory.exists(dir)):
+ util.directory.copy(
+ dir,
+ common_images,
+ overwrite_flag=True)
+
+ # Copy /usr/share/pki/<subsystem>-ui/webapps/<subsystem>/ee/graphics
+ # to <instance>/webapp/pki/images
+ dir = os.path.join(
+ config.PKI_DEPLOYMENT_SOURCE_ROOT,
+ master['pki_subsystem'].lower() + "-ui",
+ "webapps",
+ master['pki_subsystem'].lower(),
+ "ee",
+ "graphics")
+ if (util.directory.exists(dir)):
+ util.directory.copy(
+ dir,
+ common_images,
+ overwrite_flag=True)
+
util.directory.copy(
os.path.join(
config.PKI_DEPLOYMENT_SOURCE_ROOT,
diff --git a/base/setup/pkicreate b/base/setup/pkicreate
index 506e766ef..767960778 100755
--- a/base/setup/pkicreate
+++ b/base/setup/pkicreate
@@ -2061,11 +2061,42 @@ sub process_pki_directories
$default_dir_permissions, $default_file_permissions,
$pki_user, $pki_group);
-
return 0 if !copy_directory($ui_subsystem_path, $pki_instance_path,
$default_dir_permissions, $default_file_permissions,
$pki_user, $pki_group);
+ # Copy /usr/share/pki/common-ui/admin/console/img
+ # to <instance>/docroot/pki/images
+ return 0 if !copy_directory(
+ "$common_ui_subsystem_path/admin/console/img",
+ "$docroot_instance_path/pki/images",
+ $default_dir_permissions, $default_file_permissions,
+ $pki_user, $pki_group);
+
+ # Copy /usr/share/pki/common-ui/css
+ # to <instance>/docroot/pki/css
+ return 0 if !copy_directory(
+ "$common_ui_subsystem_path/css",
+ "$docroot_instance_path/pki/css",
+ $default_dir_permissions, $default_file_permissions,
+ $pki_user, $pki_group);
+
+ # Copy /usr/share/pki/common-ui/img
+ # to <instance>/docroot/pki/images
+ return 0 if !copy_directory(
+ "$common_ui_subsystem_path/img",
+ "$docroot_instance_path/pki/images",
+ $default_dir_permissions, $default_file_permissions,
+ $pki_user, $pki_group);
+
+ # Copy /usr/share/pki/<subsystem>-ui/docroot/<subsystem>/admin/console/img
+ # to <instance>/docroot/pki/images
+ return 0 if !copy_directory(
+ "$ui_subsystem_path/docroot/$subsystem_type/admin/console/img",
+ "$docroot_instance_path/pki/images",
+ $default_dir_permissions, $default_file_permissions,
+ $pki_user, $pki_group);
+
# fix permissions
if (!is_Windows()) {
# Apache Specific