Repository: ambari Updated Branches: refs/heads/trunk f7acf8edd -> e9c943905
AMBARI-15754. configs.sh expands ***** in config values to a local file list, causing broken config files (Asger Askov Blekinge via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e9c94390 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e9c94390 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e9c94390 Branch: refs/heads/trunk Commit: e9c943905721ef431dc09b45abaf4a05312d4fe5 Parents: f7acf8e Author: Alejandro Fernandez <afernan...@hortonworks.com> Authored: Wed Feb 22 16:03:40 2017 -0800 Committer: Alejandro Fernandez <afernan...@hortonworks.com> Committed: Wed Feb 22 17:21:13 2017 -0800 ---------------------------------------------------------------------- ambari-server/src/main/resources/scripts/configs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e9c94390/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 da88520..eeb53c5 100755 --- a/ambari-server/src/main/resources/scripts/configs.sh +++ b/ambari-server/src/main/resources/scripts/configs.sh @@ -168,7 +168,7 @@ doConfigUpdate () { finalJson="{ \"Clusters\": { \"desired_config\": {\"type\": \"$SITE\", \"tag\":\"$newTag\", $newProperties}}}" newFile="doSet_$newTag.json" echo "########## Putting json into: $newFile" - echo $finalJson > $newFile + echo "$finalJson" > $newFile curl -k -u $USERID:$PASSWD -X PUT -H "X-Requested-By: ambari" "$AMBARIURL/api/v1/clusters/$CLUSTER" --data @$newFile currentSiteTag echo "########## NEW Site:$SITE, Tag:$SITETAG"; @@ -193,7 +193,7 @@ doConfigFileUpdate () { newProperties=`cat $FILENAME`; finalJson="{ \"Clusters\": { \"desired_config\": {\"type\": \"$SITE\", \"tag\":\"$newTag\", $newProperties}}}" newFile="doSet_$newTag.json" - echo $finalJson>$newFile + echo "$finalJson" > $newFile echo "########## PUTting file:\"$FILENAME\" into config(type:\"$SITE\", tag:$newTag) via $newFile" curl -k -u $USERID:$PASSWD -X PUT -H "X-Requested-By: ambari" "$AMBARIURL/api/v1/clusters/$CLUSTER" --data @$newFile currentSiteTag @@ -240,9 +240,9 @@ doGet () { fi if [ "$propertiesStarted" -gt "0" ]; then if [ -z $FILENAME ]; then - echo $line + echo "$line" else - echo $line >> $FILENAME + echo "$line" >> $FILENAME fi fi if [ "`echo $line | grep -E "{$"`" ]; then