Repository: ambari Updated Branches: refs/heads/branch-2.4 f613941aa -> 14c6114f4
AMBARI-15754. configs.sh expands ***** in config values to a local file list, causing broken config files (Asger Askov Blekinge via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14c6114f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14c6114f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14c6114f Branch: refs/heads/branch-2.4 Commit: 14c6114f4d50323f51cc4ebeb08782cec4f698a9 Parents: f613941 Author: Sumit Mohanty <[email protected]> Authored: Thu Feb 23 14:01:35 2017 -0800 Committer: Sumit Mohanty <[email protected]> Committed: Tue Apr 18 14:34:02 2017 -0700 ---------------------------------------------------------------------- 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/14c6114f/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 ba02d2d..3b57d2e 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
