summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-08-05 01:05:13 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-08-05 01:05:13 +0000
commitcb1105661a72a6c6c28d8f11e2851bb4848cd7c5 (patch)
tree72d5170debb5c040efd8bad5d2f4b3387d92cb44 /app-admin/syslog-ng/files
parentclaims of a newer libxml2 needed... (Manifest recommit) (diff)
downloadgentoo-2-cb1105661a72a6c6c28d8f11e2851bb4848cd7c5.tar.gz
gentoo-2-cb1105661a72a6c6c28d8f11e2851bb4848cd7c5.tar.bz2
gentoo-2-cb1105661a72a6c6c28d8f11e2851bb4848cd7c5.zip
checkconfig before reload to catch mis-config earlier. Patch from Eldad Zack via bug #58216
Diffstat (limited to 'app-admin/syslog-ng/files')
-rw-r--r--app-admin/syslog-ng/files/syslog-ng.rc65
1 files changed, 4 insertions, 1 deletions
diff --git a/app-admin/syslog-ng/files/syslog-ng.rc6 b/app-admin/syslog-ng/files/syslog-ng.rc6
index 3e0960479533..608dfc6f52bc 100644
--- a/app-admin/syslog-ng/files/syslog-ng.rc6
+++ b/app-admin/syslog-ng/files/syslog-ng.rc6
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 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,v 1.13 2004/07/14 21:20:06 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.rc6,v 1.14 2004/08/05 01:05:13 mr_bones_ Exp $
opts="depend checkconfig start stop reload"
@@ -20,6 +20,8 @@ checkconfig() {
eerror "An example can be found in /etc/syslog-ng/syslog-ng.conf.sample"
return 1
fi
+ syslog-ng -s /etc/syslog-ng/syslog-ng.conf
+ eend $? "Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)"
}
start() {
@@ -41,6 +43,7 @@ reload() {
eerror "syslog-ng isn't running"
return 1
fi
+ checkconfig || return 1
ebegin "Reloading configuration and re-opening log files"
kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null
eend $?