Skip to content

Commit

Permalink
DBZ-8266 Make cp working also on RHEL
Browse files Browse the repository at this point in the history
  • Loading branch information
vjuranek authored and jpechane committed Sep 26, 2024
1 parent 5f46126 commit 126b24b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions connect-base/2.7/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,15 @@ case $1 in
echo " OFFSET_FLUSH_TIMEOUT_MS=$CONNECT_OFFSET_FLUSH_TIMEOUT_MS"
echo " SHUTDOWN_TIMEOUT=$CONNECT_TASK_SHUTDOWN_GRACEFUL_TIMEOUT_MS"

# Copy config files if not provided in volume
cp -r --update=none $KAFKA_HOME/config.orig/* $KAFKA_HOME/config
# Choose the right `cp` argument, `--update=none` is not available on RHEL
release=`cat /etc/redhat-release | cut -d ' ' -f1`
if [ $release = "Fedora" ]; then
cp_arg="-r --update=none"
else
cp_arg="-rn"
fi
# Copy config files if not provided in volume
cp $cp_arg $KAFKA_HOME/config.orig/* $KAFKA_HOME/config

#
# Configure the log files ...
Expand Down
11 changes: 9 additions & 2 deletions connect-base/3.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,15 @@ case $1 in
echo " OFFSET_FLUSH_TIMEOUT_MS=$CONNECT_OFFSET_FLUSH_TIMEOUT_MS"
echo " SHUTDOWN_TIMEOUT=$CONNECT_TASK_SHUTDOWN_GRACEFUL_TIMEOUT_MS"

# Copy config files if not provided in volume
cp -r --update=none $KAFKA_HOME/config.orig/* $KAFKA_HOME/config
# Choose the right `cp` argument, `--update=none` is not available on RHEL
release=`cat /etc/redhat-release | cut -d ' ' -f1`
if [ $release = "Fedora" ]; then
cp_arg="-r --update=none"
else
cp_arg="-rn"
fi
# Copy config files if not provided in volume
cp $cp_arg $KAFKA_HOME/config.orig/* $KAFKA_HOME/config

#
# Configure the log files ...
Expand Down

0 comments on commit 126b24b

Please sign in to comment.