Repository: ambari Updated Branches: refs/heads/branch-2.5 80eb198dc -> a65bf3612
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/a65bf361 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a65bf361 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a65bf361 Branch: refs/heads/branch-2.5 Commit: a65bf361277a285292e08901ae4f5ecdafe9246e Parents: 80eb198 Author: Sumit Mohanty <[email protected]> Authored: Thu Feb 23 14:01:35 2017 -0800 Committer: Sumit Mohanty <[email protected]> Committed: Thu Feb 23 14:01:35 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/a65bf361/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 8fcffd5..5fc96fd 100755 --- a/ambari-server/src/main/resources/scripts/configs.sh +++ b/ambari-server/src/main/resources/scripts/configs.sh @@ -171,7 +171,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"; @@ -196,7 +196,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 @@ -243,9 +243,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
