From c09abcacb85a8e511a658c0b8819a9d652682d188eb09f6b5638cf9175de2b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Fri, 9 Aug 2024 07:37:01 +0000 Subject: [PATCH] [info=155ed9a8dbb3deabb9ffb9f812915616] OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postfix-image?expand=0&rev=10 --- entrypoint.sles.sh | 20 +++++++++++++------- postfix-image.changes | 5 +++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/entrypoint.sles.sh b/entrypoint.sles.sh index f0f5ba9..271204b 100644 --- a/entrypoint.sles.sh +++ b/entrypoint.sles.sh @@ -358,7 +358,7 @@ configure_postfix() { terminate() { base=$(basename "$1") - pid=$(/bin/pidof "$base") + pid=$(/usr/bin/ps -aux | /usr/bin/grep "$base" | /usr/bin/grep -v grep | /usr/bin/awk '{print $2}' | /usr/bin/tr '\n' ' ') if [ -n "$pid" ]; then echo "Terminating $base..." @@ -379,15 +379,15 @@ stop_postfix() { typeset -i sec=$1 typeset -i ms=$((sec*100)) - ( while ! pidof qmgr > /dev/null 2>&1 ; do + ( while ! (ps -aux | grep qmgr | grep -v grep | awk '{print $2}' | tr '\n' ' ') > /dev/null 2>&1; do ((ms-- <= 0)) && break usleep 10000 - done - exec postfix flush - ) > /dev/null 2>&1 & + done + exec postfix flush + ) > /dev/null 2>&1 & postfix stop - terminate /usr/sbin/syslogd + terminate /usr/sbin/rsyslogd } stop_daemons() { @@ -397,7 +397,13 @@ stop_daemons() { start_daemons() { # Don't start syslogd in background while starting it in the background... # Logging to stdout does not work else. - /usr/sbin/syslogd -n -S -O - "$@" + echo '# rsyslog configuration file to log to stdout + module(load="imuxsock") # provides support for local system logging (e.g. via logger command) + + *.* action(type="omfile" file="/var/log/rsyslog.log")' > /entrypoint/rsyslog-stdout.conf + /usr/sbin/rsyslogd -f /entrypoint/rsyslog-stdout.conf -i /var/run/rsyslogd-stdout.pid + + "$@" } # diff --git a/postfix-image.changes b/postfix-image.changes index 8061195..bb25d4e 100644 --- a/postfix-image.changes +++ b/postfix-image.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 9 07:32:37 UTC 2024 - Priyanka Saggu + +- fix SLE entrypoint scripts + ------------------------------------------------------------------- Thu Aug 8 19:28:10 UTC 2024 - Dirk Mueller