This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 48582d17adf826b1144b3c3ab9ee3c826a866344
Author: Andrew Onishuk <aonis...@hortonworks.com>
AuthorDate: Fri Feb 9 14:16:05 2018 +0200

    AMBARI-22941. Debian stackdeploys failing with "ambari-agent: command not 
found" errors (aonishuk)
---
 ambari-agent/conf/unix/install-helper.sh | 29 +++++++++++------------------
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/ambari-agent/conf/unix/install-helper.sh 
b/ambari-agent/conf/unix/install-helper.sh
index a97cf61..b0b6449 100644
--- a/ambari-agent/conf/unix/install-helper.sh
+++ b/ambari-agent/conf/unix/install-helper.sh
@@ -19,10 +19,12 @@
 ##################################################################
 
 INSTALL_HELPER_SERVER="/var/lib/ambari-server/install-helper.sh"
-COMMON_DIR_AGENT="/usr/lib/ambari-agent/lib/ambari_commons"
-RESOURCE_MANAGEMENT_DIR_AGENT="/usr/lib/ambari-agent/lib/resource_management"
-JINJA_AGENT_DIR="/usr/lib/ambari-agent/lib/ambari_jinja2"
-SIMPLEJSON_AGENT_DIR="/usr/lib/ambari-agent/lib/ambari_simplejson"
+COMMON_DIR="/usr/lib/ambari-agent/lib/ambari_commons"
+RESOURCE_MANAGEMENT_DIR="/usr/lib/ambari-agent/lib/resource_management"
+JINJA_DIR="/usr/lib/ambari-agent/lib/ambari_jinja2"
+SIMPLEJSON_DIR="/usr/lib/ambari-agent/lib/ambari_simplejson"
+OLD_OLD_COMMON_DIR="/usr/lib/ambari-agent/lib/common_functions"
+AMBARI_AGENT="/usr/lib/ambari-agent/lib/ambari_agent"
 PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
 AMBARI_AGENT_VAR="/var/lib/ambari-agent"
 AMBARI_AGENT_BINARY="/etc/init.d/ambari-agent"
@@ -35,15 +37,6 @@ 
OLD_JINJA_DIR="/usr/lib/python2.6/site-packages/ambari_jinja2"
 OLD_SIMPLEJSON_DIR="/usr/lib/python2.6/site-packages/ambari_simplejson"
 OLD_AMBARI_AGENT_DIR="/usr/lib/python2.6/site-packages/ambari_agent"
 
-COMMON_DIR="/usr/lib/ambari-agent/lib/ambari_commons"
-RESOURCE_MANAGEMENT_DIR="/usr/lib/ambari-agent/lib/resource_management"
-JINJA_DIR="/usr/lib/ambari-agent/lib/ambari_jinja2"
-SIMPLEJSON_DIR="/usr/lib/ambari-agent/lib/ambari_simplejson"
-STOMP_DIR="/usr/lib/ambari-agent/lib/ambari_stomp"
-WS4PY_DIR="/usr/lib/ambari-agent/lib/ambari_ws4py"
-OLD_COMMON_DIR="/usr/lib/ambari-agent/lib/common_functions"
-AMBARI_AGENT="/usr/lib/ambari-agent/lib/ambari_agent"
-
 clean_pyc_files(){
   # cleaning old *.pyc files
   find ${RESOURCE_MANAGEMENT_DIR:?} -name *.pyc -exec rm {} \;
@@ -59,13 +52,13 @@ do_install(){
     mv /etc/ambari-agent/conf.save /etc/ambari-agent/conf_$(date 
'+%d_%m_%y_%H_%M').save
   fi
 
+  # these symlinks (or directories) where created in ambari releases prior to 
ambari-2.6.2. Do clean up.   
+  rm -rf "$OLD_COMMON_DIR" "$OLD_RESOURCE_MANAGEMENT_DIR" "$OLD_JINJA_DIR" 
"$OLD_SIMPLEJSON_DIR" "$OLD_OLD_COMMON_DIR" "$OLD_AMBARI_AGENT_DIR"
+
   # setting up /usr/sbin/ambari-agent symlink
   rm -f "$AMBARI_AGENT_BINARY_SYMLINK"
   ln -s "$AMBARI_AGENT_BINARY" "$AMBARI_AGENT_BINARY_SYMLINK"
 
-  # these symlinks (or directories) where created in ambari releases prior to 
ambari-2.6.2. Do clean up.   
-  rm -rf "$OLD_COMMON_DIR" "$OLD_RESOURCE_MANAGEMENT_DIR" "$OLD_JINJA_DIR" 
"$OLD_SIMPLEJSON_DIR" "$OLD_COMMON_DIR" "$OLD_AMBARI_AGENT_DIR"
-  
   # on nano Ubuntu, when umask=027 those folders are created without 'x' bit 
for 'others'.
   # which causes failures when hadoop users try to access tmp_dir
   chmod a+x $AMBARI_AGENT_VAR
@@ -146,7 +139,7 @@ do_remove(){
   fi
   
   if [ -d "$COMMON_DIR" ]; then
-    rm -f $COMMON_DIR
+    rm -rf $COMMON_DIR
   fi
   
   if [ -d "$RESOURCE_MANAGEMENT_DIR" ]; then
@@ -158,7 +151,7 @@ do_remove(){
   fi
 
   if [ -d "$SIMPLEJSON_DIR" ]; then
-    rm -f $SIMPLEJSON_DIR
+    rm -rf $SIMPLEJSON_DIR
   fi
 
   # if server package exists, restore their settings

-- 
To stop receiving notification emails like this one, please contact
aonis...@apache.org.

Reply via email to