summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-11-20 10:55:27 +0100
committerLars Wendler <polynomial-c@gentoo.org>2019-11-20 11:08:35 +0100
commit0d4daf7b471424a0ef04c3fd66901c606aa2337c (patch)
treefdd28e0de54361eeb56cc904936be62b4c7a82c2 /app-admin/sysklogd
parentmedia-libs/alsa-lib: Bump to version 1.2.1.1 (diff)
downloadgentoo-0d4daf7b471424a0ef04c3fd66901c606aa2337c.tar.gz
gentoo-0d4daf7b471424a0ef04c3fd66901c606aa2337c.tar.bz2
gentoo-0d4daf7b471424a0ef04c3fd66901c606aa2337c.zip
app-admin/sysklogd: Use reasonable defaults for syslogd
Respect logrotate USE flag again and inform users about new built-in log rotation functionality. 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.confd26
-rw-r--r--app-admin/sysklogd/sysklogd-2.0.ebuild19
2 files changed, 22 insertions, 3 deletions
diff --git a/app-admin/sysklogd/files/sysklogd.confd2 b/app-admin/sysklogd/files/sysklogd.confd2
new file mode 100644
index 00000000000..077f36bf6b6
--- /dev/null
+++ b/app-admin/sysklogd/files/sysklogd.confd2
@@ -0,0 +1,6 @@
+# Config file for /etc/init.d/sysklogd
+
+SYSLOGD="-m 0 -s -s -r 10M:10"
+# send warnings and above to the console
+KLOGD="-c 3 -2"
+
diff --git a/app-admin/sysklogd/sysklogd-2.0.ebuild b/app-admin/sysklogd/sysklogd-2.0.ebuild
index b1caf749a27..cc3f3615e06 100644
--- a/app-admin/sysklogd/sysklogd-2.0.ebuild
+++ b/app-admin/sysklogd/sysklogd-2.0.ebuild
@@ -36,7 +36,6 @@ src_prepare() {
src_configure() {
local myeconfargs=(
- # we have logger from sys-apps/util-linux
$(use_with klogd)
$(use_with logger)
$(use_with systemd systemd $(systemd_get_systemunitdir))
@@ -51,8 +50,22 @@ src_install() {
doins syslog.conf
keepdir /etc/syslog.d
+ newinitd "${FILESDIR}"/sysklogd.rc8 sysklogd
+ newconfd "${FILESDIR}"/sysklogd.confd2 sysklogd
+
+ if use logrotate ; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/sysklogd.logrotate sysklogd
+ sed 's@ -r 10M:10@@' -i "${ED}"/etc/conf.d/sysklogd || die
+ fi
+
find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die
+}
- newinitd "${FILESDIR}"/sysklogd.rc8 sysklogd
- newconfd "${FILESDIR}"/sysklogd.confd sysklogd
+pkg_postinst() {
+ if ! use logrotate && [[ -n ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -lt 2.0 ; then
+ elog "Starting with version 2.0 syslogd has built in log rotation"
+ elog "functionality that does no longer require a running cron daemon."
+ elog "So we no longer install any log rotation cron files for sysklogd."
+ fi
}