Ver código fonte

AMBARI-15163. 'ambari-server start' is failed [import FatalException, NonFatalException] after upgrade from 2.1.2 ... 2.2.0.0 etc to 2.2.1.1 (aonishuk)

Andrew Onishuk 9 anos atrás
pai
commit
16a0d794be
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      ambari-server/conf/unix/install-helper.sh

+ 1 - 1
ambari-server/conf/unix/install-helper.sh

@@ -114,7 +114,7 @@ do_install(){
 
   PYTHON_PATH_LINE='export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.6/site-packages'
   grep "^$PYTHON_PATH_LINE\$" "$AMBARI_ENV_RPMSAVE" > /dev/null
-  if [ $? -ne 0 ]; then
+  if [ -f "$AMBARI_ENV_RPMSAVE" ] && [ $? -ne 0 ] ; then
     echo -e "\n$PYTHON_PATH_LINE" >> $AMBARI_ENV_RPMSAVE
   fi
 }