From 864154ad5d055b498f9e18faf243ea2399448134 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Mon, 18 Nov 2019 18:11:03 +0100 Subject: [PATCH] app-admin/sysklogd: Fixed init script to properly start deamons Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Lars Wendler --- app-admin/sysklogd/files/sysklogd.rc8 | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app-admin/sysklogd/files/sysklogd.rc8 b/app-admin/sysklogd/files/sysklogd.rc8 index 6b411d55c987..a6590d725a69 100644 --- a/app-admin/sysklogd/files/sysklogd.rc8 +++ b/app-admin/sysklogd/files/sysklogd.rc8 @@ -17,12 +17,24 @@ start_daemon() { local retval=0 local daemon="$1" local options="$2" - - [ -z "${daemon}" ] && return 1 + local fg_opt="" + + case "${daemon}" in + syslogd) + fg_opt="-F" + ;; + klogd) + fgopt="-n" + ;; + *) + return 1 + ;; + esac ebegin "sysklogd -> start: ${daemon}" start-stop-daemon --start --exec /usr/sbin/"${daemon}" \ - --pidfile /var/run/"${daemon}".pid -- ${options} + -b -m --pidfile /var/run/"${daemon}".pid \ + -- ${fg_opt} ${options} retval=$? eend ${retval} "Failed to start ${daemon}" -- 2.26.2