commit: eb28ed4ff50815fc3b41354ad9e61acef8b284c4
Author: Bertrand Jacquin <bertrand <AT> jacquin <DOT> bzh>
AuthorDate: Sun Feb 21 19:45:51 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Mar 9 17:13:47 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb28ed4f
net-irc/irker: Default logging is now syslog instead of file
This behaviour appeared in version 2.9.
Handle IRKERD_LOGFILE checkpath only when IRKERD_LOGFILE is defined as
IRKERD_LOGLEVEL is independant.
Package-Manager: portage-2.2.26
net-irc/irker/files/irkerd.confd | 5 ++---
net-irc/irker/files/irkerd.initd | 10 ++--------
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/net-irc/irker/files/irkerd.confd b/net-irc/irker/files/irkerd.confd
index f176e62..42ae732 100644
--- a/net-irc/irker/files/irkerd.confd
+++ b/net-irc/irker/files/irkerd.confd
@@ -6,14 +6,13 @@
# Nick-Server password
# IRKERD_PASSWORD=""
-# Log file, intended for debug purpose only, no logrotate will
-# handle this logfile
+# Log file, if none syslog is used (facility daemon)
# IRKERD_LOGFILE=""
# Debug Level (critical, error, warning, info, debug)
# IRKERD_LOGLEVEL=""
-# To run an anonymous irkerd safely. It should not able able
+# To run an anonymous irkerd safely. It should not be able
# to write to anywhere on your system
# IRKERD_USER=""
diff --git a/net-irc/irker/files/irkerd.initd b/net-irc/irker/files/irkerd.initd
index 246fcf4..2ea6a44 100644
--- a/net-irc/irker/files/irkerd.initd
+++ b/net-irc/irker/files/irkerd.initd
@@ -7,8 +7,6 @@
: ${IRKERD_NICK:=}
: ${IRKERD_PASSWORD:=}
-: ${IRKERD_LOGFILE:=/var/log/${RC_SVCNAME}.log}
-: ${IRKERD_LOGLEVEL:=0}
: ${IRKERD_USER:=nobody}
depend() {
@@ -16,12 +14,7 @@ depend() {
}
start () {
- if [[ ${IRKERD_LOGLEVEL} ]] ; then
- IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
-
- ewarn "IRKERD_LOGLEVEL is intended to be used for debugging
purpose only"
- ewarn "No logrotate can handle ${IRKERD_LOGFILE}"
-
+ if [[ ${IRKERD_LOGFILE} ]] ; then
checkpath -f \
-o "${IRKERD_USER}" \
"${IRKERD_LOGFILE}" \
@@ -32,6 +25,7 @@ start () {
die "IRKERD_USER is mandatory"
fi
+ [[ -n "${IRKERD_LOGLEVEL}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -d
${IRKERD_LOGLEVEL}"
[[ -n "${IRKERD_LOGFILE}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -l
${IRKERD_LOGFILE}"
[[ -n "${IRKERD_NICK}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -n
${IRKERD_NICK}"
[[ -n "${IRKERD_PASSWORD}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -p
${IRKERD_PASSWORD}"