diff --git a/connect-base/2.7/docker-entrypoint.sh b/connect-base/2.7/docker-entrypoint.sh index e3083c5d..f791d23a 100755 --- a/connect-base/2.7/docker-entrypoint.sh +++ b/connect-base/2.7/docker-entrypoint.sh @@ -276,7 +276,7 @@ case $1 in env_var=`echo "$VAR" | sed -r "s/([^=]*)=.*/\1/g"` prop_name=`echo "$VAR" | sed -r "s/^CONNECT_([^=]*)=.*/\1/g" | tr '[:upper:]' '[:lower:]' | tr _ .` prop_value=`echo "$VAR" | sed -r "s/^CONNECT_[^=]*=(.*)/\1/g"` - if egrep -q "(^|^#)$prop_name=" $KAFKA_HOME/config/log4j.properties; then + if grep -Eq "(^|^#)$prop_name=" $KAFKA_HOME/config/log4j.properties; then #note that no config names or values may contain an '@' char sed -r -i "s@(^|^#)($prop_name)=(.*)@\2=${prop_value}@g" $KAFKA_HOME/config/log4j.properties else @@ -304,7 +304,7 @@ case $1 in if [[ $env_var =~ ^CONNECT_ ]]; then prop_name=`echo "$VAR" | sed -r "s/^CONNECT_([^=]*)=.*/\1/g" | tr '[:upper:]' '[:lower:]' | tr _ .` prop_value=`echo "$VAR" | sed -r "s/^CONNECT_[^=]*=(.*)/\1/g"` - if egrep -q "(^|^#)$prop_name=" $KAFKA_HOME/config/connect-distributed.properties; then + if grep -Eq "(^|^#)$prop_name=" $KAFKA_HOME/config/connect-distributed.properties; then #note that no config names or values may contain an '@' char sed -r -i "s@(^|^#)($prop_name)=(.*)@\2=${prop_value}@g" $KAFKA_HOME/config/connect-distributed.properties else diff --git a/kafka/2.7/docker-entrypoint.sh b/kafka/2.7/docker-entrypoint.sh index 920d8c79..36a58e46 100755 --- a/kafka/2.7/docker-entrypoint.sh +++ b/kafka/2.7/docker-entrypoint.sh @@ -151,7 +151,7 @@ case $1 in env_var=`echo "$VAR" | sed "s/=.*//"` if [[ $env_var =~ ^KAFKA_ && $env_var != "KAFKA_VERSION" && $env_var != "KAFKA_HOME" && $env_var != "KAFKA_LOG4J_OPTS" && $env_var != "KAFKA_JMX_OPTS" ]]; then prop_name=`echo "$VAR" | sed -r "s/^KAFKA_(.*)=.*/\1/g" | tr '[:upper:]' '[:lower:]' | tr _ .` - if egrep -q "(^|^#)$prop_name=" $KAFKA_HOME/$CONFIG_FILE; then + if grep -Eq "(^|^#)$prop_name=" $KAFKA_HOME/$CONFIG_FILE; then #note that no config names or values may contain an '@' char sed -r -i "s%(^|^#)($prop_name)=(.*)%\2=${!env_var}%g" $KAFKA_HOME/$CONFIG_FILE else