summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2011-10-18 20:21:58 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2011-10-18 20:21:58 +0000
commit5bf31cd8295c8fd7f9e6a36a28cf228c1ebc5b9d (patch)
tree215349bd01bf86c52830f69351d2178a06571ef7 /app-admin
parentUndo nommu and rebuild config to get all the ash features enabled by default ... (diff)
downloadgentoo-2-5bf31cd8295c8fd7f9e6a36a28cf228c1ebc5b9d.tar.gz
gentoo-2-5bf31cd8295c8fd7f9e6a36a28cf228c1ebc5b9d.tar.bz2
gentoo-2-5bf31cd8295c8fd7f9e6a36a28cf228c1ebc5b9d.zip
add patch from Marcel Pennewiß to improve flexibility (bug #373583)
(Portage version: 2.1.10.11/cvs/Linux i686)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/syslog-ng/ChangeLog6
-rw-r--r--app-admin/syslog-ng/files/syslog-ng.rc6.3.369
-rw-r--r--app-admin/syslog-ng/syslog-ng-3.3.1.ebuild4
3 files changed, 76 insertions, 3 deletions
diff --git a/app-admin/syslog-ng/ChangeLog b/app-admin/syslog-ng/ChangeLog
index 1d37901da3c4..55e156bd4d19 100644
--- a/app-admin/syslog-ng/ChangeLog
+++ b/app-admin/syslog-ng/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-admin/syslog-ng
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.306 2011/10/07 16:40:50 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.307 2011/10/18 20:21:58 mr_bones_ Exp $
+
+ 18 Oct 2011; Michael Sterrett <mr_bones_@gentoo.org> syslog-ng-3.3.1.ebuild,
+ +files/syslog-ng.rc6.3.3:
+ add patch from Marcel Pennewiß to improve flexibility (bug #373583)
07 Oct 2011; Michael Sterrett <mr_bones_@gentoo.org> syslog-ng-3.3.1.ebuild,
+files/syslog-ng-3.3.1-ssl.patch:
diff --git a/app-admin/syslog-ng/files/syslog-ng.rc6.3.3 b/app-admin/syslog-ng/files/syslog-ng.rc6.3.3
new file mode 100644
index 000000000000..c1ea45cc6d7d
--- /dev/null
+++ b/app-admin/syslog-ng/files/syslog-ng.rc6.3.3
@@ -0,0 +1,69 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.rc6.3.3,v 1.1 2011/10/18 20:21:58 mr_bones_ Exp $
+
+extra_commands="checkconfig reload"
+
+SYSLOG_NG_SERVICE=${SVCNAME#*.}
+SYSLOG_NG_SERVICE=${SYSLOG_NG_SERVICE:-syslog-ng}
+
+SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${SYSLOG_NG_SERVICE}.conf}
+SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE:-/var/run/${SVCNAME}.pid}
+SYSLOG_NG_OPTS="--cfgfile ${SYSLOG_NG_CONFIGFILE} --pidfile ${SYSLOG_NG_PIDFILE} ${SYSLOG_NG_OPTS}"
+
+depend() {
+ # Make networking dependency conditional on configuration
+ if [ -f "${SYSLOG_NG_CONFIGFILE}" ]; then
+ case `sed 's/#.*//' "${SYSLOG_NG_CONFIGFILE}"` in
+ *source*tcp*|*source*udp*|*destination*tcp*|*destination*udp*)
+ need net
+ use stunnel ;;
+ esac
+ fi
+
+ config "${SYSLOG_NG_CONFIGFILE}"
+ use clock
+ need hostname localmount
+ provide logger
+}
+
+checkconfig() {
+ if [ ! -e "${SYSLOG_NG_CONFIGFILE}" ] ; then
+ eerror "You need to create ${SYSLOG_NG_CONFIGFILE} first."
+ eerror "An example can be found in /usr/share/doc/syslog"
+
+ return 1
+ fi
+ syslog-ng -s -f "${SYSLOG_NG_CONFIGFILE}"
+
+ # the start and reload functions have their own eends so
+ # avoid calling this twice when there are no problems
+ [ $? -eq 0 ] || eend $? "Configuration error. Please fix your configfile (${SYSLOG_NG_CONFIGFILE})"
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ [ -n "${SYSLOG_NG_OPTS}" ] && SYSLOG_NG_OPTS="-- ${SYSLOG_NG_OPTS}"
+ start-stop-daemon --start --pidfile "${SYSLOG_NG_PIDFILE}" --exec /usr/sbin/syslog-ng ${SYSLOG_NG_OPTS}
+ eend $? "Failed to start ${SVCNAME}"
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile "${SYSLOG_NG_PIDFILE}"
+ eend $? "Failed to stop ${SVCNAME}"
+ sleep 1 # needed for syslog-ng to stop in case we're restarting
+}
+
+reload() {
+ if [ ! -f "${SYSLOG_NG_PIDFILE}" ]; then
+ eerror "${SVCNAME} isn't running"
+ return 1
+ fi
+ checkconfig || return 1
+ ebegin "Reloading configuration and re-opening log files"
+ start-stop-daemon --signal HUP --pidfile "${SYSLOG_NG_PIDFILE}"
+ eend $?
+}
diff --git a/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild b/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild
index f8bc0b80a246..771278982f2c 100644
--- a/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild
+++ b/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild,v 1.3 2011/10/07 16:40:50 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild,v 1.4 2011/10/18 20:21:58 mr_bones_ Exp $
EAPI=2
inherit autotools fixheadtails eutils multilib
@@ -98,7 +98,7 @@ src_install() {
newins "${FILESDIR}/syslog-ng.logrotate" syslog-ng || die
fi
- newinitd "${FILESDIR}/syslog-ng.rc6.${PV%%.*}" syslog-ng || die
+ newinitd "${FILESDIR}/syslog-ng.rc6.${PV%.*}" syslog-ng || die
newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng || die
keepdir /etc/syslog-ng/patterndb.d
find "${D}" -type f -name '*.la' -exec rm {} + || die