This is an automated email from the ASF dual-hosted git repository.

gianm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 61ed0a389d6 fix: use portable printf for Docker runtime properties 
(#20272)
61ed0a389d6 is described below

commit 61ed0a389d6af0a3e410b651f379d4f554bbcacb
Author: Frank Chen <[email protected]>
AuthorDate: Thu Sep 10 11:17:03 2026 +0800

    fix: use portable printf for Docker runtime properties (#20272)
---
 distribution/docker/druid.sh | 6 +++---
 distribution/docker/peon.sh  | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/distribution/docker/druid.sh b/distribution/docker/druid.sh
index bf1a5c88373..46c91a2b4cc 100755
--- a/distribution/docker/druid.sh
+++ b/distribution/docker/druid.sh
@@ -101,9 +101,9 @@ setKey() {
     service_conf=$(getConfPath $service)/runtime.properties
     # Delete from all
     sed -ri "/$key=/d" $COMMON_CONF_DIR/common.runtime.properties
-    [ -f $service_conf ] && sed -ri "/$key=/d" $service_conf
-    [ -f $service_conf ] && echo -e "\n$key=$value" >>$service_conf
-    [ -f $service_conf ] || echo -e "\n$key=$value" 
>>$COMMON_CONF_DIR/common.runtime.properties
+    [ -f "$service_conf" ] && sed -ri "/$key=/d" $service_conf
+    [ -f "$service_conf" ] && printf '\n%s=%s\n' "$key" "$value" >> 
"$service_conf"
+    [ -f "$service_conf" ] || printf '\n%s=%s\n' "$key" "$value" >> 
"$COMMON_CONF_DIR/common.runtime.properties"
 
     echo "Setting $key=$value in $service_conf"
 }
diff --git a/distribution/docker/peon.sh b/distribution/docker/peon.sh
index 47e1d6b271a..a3938733d91 100755
--- a/distribution/docker/peon.sh
+++ b/distribution/docker/peon.sh
@@ -79,9 +79,9 @@ setKey() {
     service_conf=$(getConfPath $service)/runtime.properties
     # Delete from all
     sed -ri "/$key=/d" $COMMON_CONF_DIR/common.runtime.properties
-    [ -f $service_conf ] && sed -ri "/$key=/d" $service_conf
-    [ -f $service_conf ] && echo -e "\n$key=$value" >>$service_conf
-    [ -f $service_conf ] || echo -e "\n$key=$value" 
>>$COMMON_CONF_DIR/common.runtime.properties
+    [ -f "$service_conf" ] && sed -ri "/$key=/d" $service_conf
+    [ -f "$service_conf" ] && printf '\n%s=%s\n' "$key" "$value" >> 
"$service_conf"
+    [ -f "$service_conf" ] || printf '\n%s=%s\n' "$key" "$value" >> 
"$COMMON_CONF_DIR/common.runtime.properties"
 
     echo "Setting $key=$value in $service_conf"
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to