Repository: ambari
Updated Branches:
  refs/heads/trunk f4a6e1b6a -> 276879e72


AMBARI-9549. Ambari upgrade 1.7.0 -> 2.0.0 on Ubuntu fails (aonishuk)


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

Branch: refs/heads/trunk
Commit: 276879e727d0203150810b7beee6f5bd17b6dfd9
Parents: f4a6e1b
Author: Andrew Onishuk <aonis...@hortonworks.com>
Authored: Tue Feb 10 16:29:53 2015 +0200
Committer: Andrew Onishuk <aonis...@hortonworks.com>
Committed: Tue Feb 10 16:29:53 2015 +0200

----------------------------------------------------------------------
 ambari-server/src/main/package/deb/control/preinst | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/276879e7/ambari-server/src/main/package/deb/control/preinst
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/deb/control/preinst 
b/ambari-server/src/main/package/deb/control/preinst
index 142bcf7..fdf0372 100644
--- a/ambari-server/src/main/package/deb/control/preinst
+++ b/ambari-server/src/main/package/deb/control/preinst
@@ -20,11 +20,19 @@ 
STACKS_FOLDER_OLD=/var/lib/ambari-server/resources/stacks_$(date '+%d_%m_%y_%H_%
 COMMON_SERVICES_FOLDER="/var/lib/ambari-server/resources/common-services"
 
COMMON_SERVICES_FOLDER_OLD=/var/lib/ambari-server/resources/common-services_$(date
 '+%d_%m_%y_%H_%M').old
 
+AMBARI_PROPERTIES="/etc/ambari-server/conf/ambari.properties"
+AMBARI_PROPERTIES_OLD="$AMBARI_PROPERTIES.rpmsave"
+
 if [ -d "/etc/ambari-server/conf.save" ]
 then
     mv /etc/ambari-server/conf.save /etc/ambari-server/conf_$(date 
'+%d_%m_%y_%H_%M').save
 fi
 
+if [ -f "$AMBARI_PROPERTIES" ]
+then
+    mv -f "$AMBARI_PROPERTIES" "$AMBARI_PROPERTIES_OLD"
+fi
+
 if [ -d "$STACKS_FOLDER" ]
 then
     mv -f "$STACKS_FOLDER" "$STACKS_FOLDER_OLD"

Reply via email to