diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2019-08-26 19:42:15 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2019-08-26 19:42:15 -0500 |
commit | 8f8a41dc02eb7f2c4c1e607fc3cb97f2c04c42e0 (patch) | |
tree | c6183267004d7a19ecb569ca836edfbe2fef7150 /packages/base/src/files/etc/profile.d | |
parent | 6dff15076ca3c692c8ba39abe4935eb38f27e2b5 (diff) |
optionally source .conf files
.conf files are now optional as environment
variables can be used instead without needing
a .conf.
Issue-ID: POLICY-1371
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I2cec20fe40d3bfd020e40c9925760de022d4ef34
Diffstat (limited to 'packages/base/src/files/etc/profile.d')
-rw-r--r-- | packages/base/src/files/etc/profile.d/env.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/base/src/files/etc/profile.d/env.sh b/packages/base/src/files/etc/profile.d/env.sh index 00f61df4..b6920935 100644 --- a/packages/base/src/files/etc/profile.d/env.sh +++ b/packages/base/src/files/etc/profile.d/env.sh @@ -35,16 +35,15 @@ if [[ -z "${POLICY_HOME}" ]]; then fi fi -confs=$(ls "${POLICY_HOME}"/etc/profile.d/*.conf 2> /dev/null) -c= - set -a POLICY_HOME=${POLICY_HOME:=/opt/app/policy} -for c in ${confs} ; do - source ${c} -done +if ls "${POLICY_HOME}"/etc/profile.d/*.conf > /dev/null 2>&1; then + for conf in "${POLICY_HOME}"/etc/profile.d/*.conf ; do + source ${conf} + done +fi for x in "${POLICY_HOME}"/bin "${JAVA_HOME}"/bin "${HOME}"/bin ; do if [ -d $x ] ; then |