Repository: ambari
Updated Branches:
  refs/heads/branch-dev-patch-upgrade b31c6c285 -> 1cc090d56


AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other 
OS's. (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a80c5a2d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a80c5a2d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a80c5a2d

Branch: refs/heads/branch-dev-patch-upgrade
Commit: a80c5a2dbaa0c48f7df87dae6a23a027c2ab6022
Parents: 2d1d5f9
Author: Andrew Onishuk <aonis...@hortonworks.com>
Authored: Mon Oct 10 17:52:36 2016 +0300
Committer: Andrew Onishuk <aonis...@hortonworks.com>
Committed: Mon Oct 10 17:52:36 2016 +0300

----------------------------------------------------------------------
 ambari-server/conf/unix/install-helper.sh | 1 +
 ambari-server/sbin/ambari-server          | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a80c5a2d/ambari-server/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/install-helper.sh 
b/ambari-server/conf/unix/install-helper.sh
index 229e146..34ec0e9 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -102,6 +102,7 @@ do_install(){
 
   sed -i "s|ambari.root.dir\s*=\s*/|ambari.root.dir=${ROOT}|g" "$AMBARI_LOG4J"
   sed -i "s|root_dir\s*=\s*/|root_dir = ${ROOT}|g" "$CA_CONFIG"
+  sed -i "s|^ROOT=\"/\"$|ROOT=\"${ROOT}\"|g" "$AMBARI_SERVER_EXECUTABLE"
 
   AUTOSTART_SERVER_CMD="" 
   which chkconfig > /dev/null 2>&1

http://git-wip-us.apache.org/repos/asf/ambari/blob/a80c5a2d/ambari-server/sbin/ambari-server
----------------------------------------------------------------------
diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 762ae19..bdbdd0f 100755
--- a/ambari-server/sbin/ambari-server
+++ b/ambari-server/sbin/ambari-server
@@ -44,8 +44,10 @@ case "${1:-}" in
 esac
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-export ROOT=`dirname $(dirname $SCRIPT_DIR)`
+# the below line (ROOT="/") is replaced by install-helper.sh. Don't 
edit/remove it.
+ROOT="/"
 ROOT=`echo $ROOT | sed 's/\/$//'`
+export ROOT
 
 export PATH=$ROOT/usr/lib/ambari-server/*:$PATH:/sbin/:/usr/sbin
 export AMBARI_CONF_DIR=$ROOT/etc/ambari-server/conf

Reply via email to