Updated Branches: refs/heads/master 87c5ae98d -> a6b3d046c
BIGTOP-888. Oozie losing value of JAVA_HOME when spawning sub-shell Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/a6b3d046 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/a6b3d046 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/a6b3d046 Branch: refs/heads/master Commit: a6b3d046cb4e6ba759a3f13f8072b07205b73b0f Parents: 87c5ae9 Author: Sean Mackrory <[email protected]> Authored: Tue Mar 26 14:56:54 2013 -0700 Committer: Roman Shaposhnik <[email protected]> Committed: Fri Apr 12 11:50:23 2013 -0700 ---------------------------------------------------------------------- bigtop-packages/src/common/oozie/oozie.init | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/a6b3d046/bigtop-packages/src/common/oozie/oozie.init ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/common/oozie/oozie.init b/bigtop-packages/src/common/oozie/oozie.init index 037f0d5..4600841 100644 --- a/bigtop-packages/src/common/oozie/oozie.init +++ b/bigtop-packages/src/common/oozie/oozie.init @@ -51,13 +51,13 @@ start_oozie() { install -d -o oozie -g oozie /var/run/oozie install -d -o oozie -g oozie /var/log/oozie install -d -o oozie -g oozie /var/tmp/oozie - su --shell=/bin/sh -l oozie -c '/usr/lib/oozie/bin/oozied.sh start' + su --shell=/bin/sh -l oozie -c "env JAVA_HOME=$JAVA_HOME /usr/lib/oozie/bin/oozied.sh start" } stop_oozie() { is_oozie_alive if [ "${STATUS}" = "0" ]; then - su --shell=/bin/sh -l oozie -c '/usr/lib/oozie/bin/oozied.sh stop -force' + su --shell=/bin/sh -l oozie -c "env JAVA_HOME=$JAVA_HOME /usr/lib/oozie/bin/oozied.sh stop -force" if [ $? -eq 0 ]; then is_oozie_alive if [ "${STATUS}" = "1" ]; then @@ -133,7 +133,7 @@ case "$1" in echo "Error: Oozie is running. Stop it first." exit 1 else - (cd /tmp ; su --shell=/bin/sh -l oozie -c '/usr/lib/oozie/bin/ooziedb.sh create -run') + (cd /tmp ; su --shell=/bin/sh -l oozie -c "env JAVA_HOME=$JAVA_HOME /usr/lib/oozie/bin/ooziedb.sh create -run") fi exit 0 ;;
