ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [3/3] ambari git commit: AMBARI-18563. Ambari startup script doesn't work on SUSE and potentially other OS's. (aonishuk)
Date Mon, 10 Oct 2016 14:53:35 GMT
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/a0693e00
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a0693e00
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a0693e00

Branch: refs/heads/branch-2.5
Commit: a0693e001020aa85c87c3a6803e775bace7f39d7
Parents: 9d6d678
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Oct 10 17:52:43 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Oct 10 17:52:43 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/a0693e00/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/a0693e00/ambari-server/sbin/ambari-server
----------------------------------------------------------------------
diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 64f1c8c..f1d6b8e 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


Mime
View raw message