app-admin/sysklogd: Fixed init script to properly start deamons
authorLars Wendler <polynomial-c@gentoo.org>
Mon, 18 Nov 2019 17:11:03 +0000 (18:11 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Mon, 18 Nov 2019 21:24:20 +0000 (22:24 +0100)
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
app-admin/sysklogd/files/sysklogd.rc8

index 6b411d55c98799f3c99b89df492369f71f04e12d..a6590d725a69ec50a010134c55f26fbf30eaa0e5 100644 (file)
@@ -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}"