>From befc601c3ce96efdbe22c7da134f500a47035ed4 Mon Sep 17 00:00:00 2001
From: Ade Lee <alee@redhat.com>
Date: Tue, 18 Dec 2012 12:14:31 -0500
Subject: [PATCH 106/107] Hardcode setting of resteasy-lib for instance

Tomcat in f17 expects the file under /etc/sysconfig/foo to be a
set of environment variables being set, and parses it that way.
We recently added some logic to source the global pki.conf file.
This works in f18, but breaks instance startup in f17.

While this works in f18, its an indication that we are using the
tomcat config file incorrectly.  Reverting to hardcoding resteasy lib.
---
 base/common/shared/conf/tomcat.conf     | 6 +-----
 base/deploy/config/pkislots.cfg         | 1 +
 base/deploy/src/scriptlets/pkiparser.py | 2 ++
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/base/common/shared/conf/tomcat.conf b/base/common/shared/conf/tomcat.conf
index 7b8f87cb5b080d8153fabce9ad315b0c4876ce3f..57a3d15097a70bfc950d8936e8d53e4dfd39f0c6 100644
--- a/base/common/shared/conf/tomcat.conf
+++ b/base/common/shared/conf/tomcat.conf
@@ -14,10 +14,6 @@
 # (see, for instance, /etc/sysconfig/tomcat)
 #
 
-if [ -f /etc/pki/pki.conf ] ; then
-  . /etc/pki/pki.conf
-fi
-
 # Where your java installation lives
 #JAVA_HOME="/usr/lib/jvm/jre"
 
@@ -37,7 +33,7 @@ CATALINA_TMPDIR=[PKI_TMPDIR]
 #JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Djava.awt.headless=true -Xmx128M"
 
 # RESTEasy
-JAVA_OPTS="$JAVA_OPTS -DRESTEASY_LIB=${RESTEASY_LIB}"
+JAVA_OPTS="$JAVA_OPTS -DRESTEASY_LIB=[PKI_RESTEASY_LIB]"
 
 # What user should run tomcat
 TOMCAT_USER="[PKI_USER]"
diff --git a/base/deploy/config/pkislots.cfg b/base/deploy/config/pkislots.cfg
index ee75154ce5ca1b683a261af704d7fd639bf5b3f6..1cb463bfed6419420b019a794c28e603c123d960 100644
--- a/base/deploy/config/pkislots.cfg
+++ b/base/deploy/config/pkislots.cfg
@@ -65,6 +65,7 @@ PKI_PROXY_SECURE_PORT_SLOT=[PKI_PROXY_SECURE_PORT]
 PKI_PROXY_UNSECURE_PORT_SLOT=[PKI_PROXY_UNSECURE_PORT]
 PKI_RANDOM_NUMBER_SLOT=[PKI_RANDOM_NUMBER]
 PKI_REGISTRY_FILE_SLOT=[PKI_REGISTRY_FILE]
+PKI_RESTEASY_LIB_SLOT=[PKI_RESTEASY_LIB]
 PKI_SECURE_PORT_SLOT=[PKI_SECURE_PORT]
 PKI_SECURE_PORT_CONNECTOR_NAME_SLOT=[PKI_SECURE_PORT_CONNECTOR_NAME]
 PKI_SECURE_PORT_SERVER_COMMENT_SLOT=[PKI_SECURE_PORT_SERVER_COMMENT]
diff --git a/base/deploy/src/scriptlets/pkiparser.py b/base/deploy/src/scriptlets/pkiparser.py
index 8f351ac551b3b32c4873c9052b6ef139df9578c5..e4a6aed854c42c826f793a6790b9fab9c1b5f508 100644
--- a/base/deploy/src/scriptlets/pkiparser.py
+++ b/base/deploy/src/scriptlets/pkiparser.py
@@ -562,6 +562,8 @@ class PKIConfigParser:
                         "<!--"
                 config.pki_master_dict['PKI_TMPDIR_SLOT'] =\
                     config.pki_master_dict['pki_tomcat_tmpdir_path']
+                config.pki_master_dict['PKI_RESTEASY_LIB_SLOT'] =\
+                    config.pki_master_dict['resteasy_lib']
                 config.pki_master_dict['PKI_RANDOM_NUMBER_SLOT'] =\
                     config.pki_master_dict['pki_one_time_pin']
                 config.pki_master_dict['PKI_SECURE_PORT_SLOT'] =\
-- 
1.7.11.7

