[COMMON] Fix a docker-entrypoint function name 34/119234/10
authorGuillaume Lambert <guillaume.lambert@orange.com>
Fri, 12 Mar 2021 10:42:42 +0000 (11:42 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Wed, 30 Jun 2021 06:21:34 +0000 (06:21 +0000)
pointed out by checkbashisms.

Issue-ID: OOM-2643
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I1915d4fcbf38b32180d5a7caa36531ad2fc798a9

kubernetes/common/cassandra/resources/config/docker-entrypoint.sh

index 5f23a89..c01d7c6 100644 (file)
@@ -28,7 +28,7 @@ _ip_address() {
 }
 
 # "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example)
-_sed-in-place() {
+_sed_in_place() {
         local filename="$1"; shift
         local tempFile
         tempFile="$(mktemp)"
@@ -57,7 +57,7 @@ if [ "$1" = 'cassandra' ]; then
         fi
         : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"}
 
-        _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \
+        _sed_in_place "$CASSANDRA_CONFIG/cassandra.yaml" \
                 -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/'
 
         for yaml in \
@@ -75,7 +75,7 @@ if [ "$1" = 'cassandra' ]; then
                 # eval presents no security issue here because of limited possible values of var
                 eval val=\$$var
                 if [ "$val" ]; then
-                        _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \
+                        _sed_in_place "$CASSANDRA_CONFIG/cassandra.yaml" \
                                 -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/'
                 fi
         done
@@ -85,7 +85,7 @@ if [ "$1" = 'cassandra' ]; then
                 # eval presents no security issue here because of limited possible values of var
                 eval val=\$$var
                 if [ "$val" ]; then
-                        _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \
+                        _sed_in_place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \
                                 -r 's/^('"$rackdc"'=).*/\1 '"$val"'/'
                 fi
         done