ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject ambari git commit: AMBARI-8320. configs.sh doConfigFileUpdate fails when multiple occurrences of word "properties" found (dlysnichenko)
Date Thu, 23 Apr 2015 09:24:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.maint 138b8ec86 -> c534b2727


AMBARI-8320. configs.sh doConfigFileUpdate fails when multiple occurrences of word "properties"
found (dlysnichenko)


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

Branch: refs/heads/branch-2.0.maint
Commit: c534b2727804c812365891481f80428718601953
Parents: 138b8ec
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Tue Apr 21 21:36:54 2015 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Thu Apr 23 12:23:58 2015 +0300

----------------------------------------------------------------------
 ambari-server/src/main/resources/scripts/configs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c534b272/ambari-server/src/main/resources/scripts/configs.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/scripts/configs.sh b/ambari-server/src/main/resources/scripts/configs.sh
index 0c5cbc0..a32ff42 100755
--- a/ambari-server/src/main/resources/scripts/configs.sh
+++ b/ambari-server/src/main/resources/scripts/configs.sh
@@ -178,7 +178,7 @@ doConfigUpdate () {
 doConfigFileUpdate () {
   FILENAME=$1
   if [ -f $FILENAME ]; then
-    if [ "1" == "`grep -n \"\\\"properties\\\"\" $FILENAME | cut -d : -f 1`" ]; then
+    if [ "1" == "$(grep -En ^\"properties\" $FILENAME | cut -d : -f 1)" ]; then
       newTag=`date "+%s%N"`
       newTag="version${newTag}"
       newProperties=`cat $FILENAME`;


Mime
View raw message