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 Tue, 21 Apr 2015 18:37:27 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e1ccd2f11 -> 91eb6961e


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/91eb6961
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91eb6961
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91eb6961

Branch: refs/heads/trunk
Commit: 91eb6961ef508a06659a5ce4c1acfd803e6502fd
Parents: e1ccd2f
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Tue Apr 21 21:36:54 2015 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Tue Apr 21 21:36:54 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/91eb6961/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