diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2019-11-18 18:11:03 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2019-11-18 22:24:20 +0100 |
commit | 864154ad5d055b498f9e18faf243ea2399448134 (patch) | |
tree | 0e67e4a67a761a6edc21903400f51924f6a68805 /app-admin/sysklogd | |
parent | dev-python/test_server: Enable py2.7, fix tests (diff) | |
download | gentoo-864154ad5d055b498f9e18faf243ea2399448134.tar.gz gentoo-864154ad5d055b498f9e18faf243ea2399448134.tar.bz2 gentoo-864154ad5d055b498f9e18faf243ea2399448134.zip |
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 <polynomial-c@gentoo.org>
Diffstat (limited to 'app-admin/sysklogd')
-rw-r--r-- | app-admin/sysklogd/files/sysklogd.rc8 | 18 |
1 files 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}" |