You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/08/10 14:47:40 UTC
ambari git commit: AMBARI-18103. Reinstalling or upgrading
ambari-server emits a warning (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 84609068e -> a7f1231fc
AMBARI-18103. Reinstalling or upgrading ambari-server emits a warning (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a7f1231f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a7f1231f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a7f1231f
Branch: refs/heads/trunk
Commit: a7f1231fcdfb0c2529f479058851aa718411b25a
Parents: 8460906
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Aug 10 17:47:28 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Aug 10 17:47:28 2016 +0300
----------------------------------------------------------------------
ambari-server/src/main/package/rpm/preinstall.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a7f1231f/ambari-server/src/main/package/rpm/preinstall.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/rpm/preinstall.sh b/ambari-server/src/main/package/rpm/preinstall.sh
index 6ed7444..6291c9e 100644
--- a/ambari-server/src/main/package/rpm/preinstall.sh
+++ b/ambari-server/src/main/package/rpm/preinstall.sh
@@ -49,7 +49,9 @@ then
mkdir "$AMBARI_VIEWS_BACKUP_FOLDER"
fi
-if [ -d "$AMBARI_VIEWS_FOLDER" ] && [ -d "$AMBARI_VIEWS_BACKUP_FOLDER" ]
+ls $AMBARI_VIEWS_FOLDER/*.jar 2>&1 > /dev/null
+JARS_EXIST="$?"
+if [ -d "$AMBARI_VIEWS_FOLDER" ] && [ -d "$AMBARI_VIEWS_BACKUP_FOLDER" ] && [ "$JARS_EXIST" -eq 0 ]
then
cp -u $AMBARI_VIEWS_FOLDER/*.jar $AMBARI_VIEWS_BACKUP_FOLDER/
fi