diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2004-07-24 21:38:37 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2004-07-24 21:38:37 +0000 |
commit | e97189151ede339e629c5bb1cdd2fae3dd9f6239 (patch) | |
tree | 5c1f106bdf4539f9692ad0bf83d5115e8276446b /app-admin | |
parent | lets give zope2.7 a try in the real world :) (diff) | |
download | gentoo-2-e97189151ede339e629c5bb1cdd2fae3dd9f6239.tar.gz gentoo-2-e97189151ede339e629c5bb1cdd2fae3dd9f6239.tar.bz2 gentoo-2-e97189151ede339e629c5bb1cdd2fae3dd9f6239.zip |
Update rc-script to have output similar to samba, and improve daemon return
handling. Also retry on syslogd, as its stubborn in some cases ...
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/sysklogd/ChangeLog | 9 | ||||
-rw-r--r-- | app-admin/sysklogd/Manifest | 24 | ||||
-rw-r--r-- | app-admin/sysklogd/files/digest-sysklogd-1.4.1-r11 | 1 | ||||
-rw-r--r-- | app-admin/sysklogd/files/sysklogd.rc6 | 78 | ||||
-rw-r--r-- | app-admin/sysklogd/sysklogd-1.4.1-r11.ebuild | 54 |
5 files changed, 138 insertions, 28 deletions
diff --git a/app-admin/sysklogd/ChangeLog b/app-admin/sysklogd/ChangeLog index 6d7c00fcf0c2..15979326e86f 100644 --- a/app-admin/sysklogd/ChangeLog +++ b/app-admin/sysklogd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-admin/sysklogd # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/ChangeLog,v 1.32 2004/06/24 21:39:04 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/ChangeLog,v 1.33 2004/07/24 21:38:37 azarah Exp $ + +*sysklogd-1.4.1-r11 (24 Jul 2004) + + 24 Jul 2004; Martin Schlemmer <azarah@gentoo.org> files/sysklogd.rc6, + +sysklogd-1.4.1-r11.ebuild: + Update rc-script to have output similar to samba, and improve daemon return + handling. Also retry on syslogd, as its stubborn in some cases ... 21 Jun 2004; <plasmaroo@gentoo.org> files/sysklogd-1.4.1-2.6.headers.patch: Updated the 2.6 headers patch to check that the <linux/list.h> header is not diff --git a/app-admin/sysklogd/Manifest b/app-admin/sysklogd/Manifest index 313bb8f4471e..c685c8c09d35 100644 --- a/app-admin/sysklogd/Manifest +++ b/app-admin/sysklogd/Manifest @@ -1,18 +1,20 @@ MD5 e6d677c10f3c10d2b210e47382dc90a1 sysklogd-1.4.1-r8.ebuild 1260 -MD5 2f2c9e67fde6062db025330bdb2b0696 sysklogd-1.4.1-r10.ebuild 1462 MD5 e8b0979f71e097d248d82513aef5a13a sysklogd-1.4.1-r7.ebuild 1234 -MD5 dd53f0e48ecd39aacf69d9179ed3e6c9 ChangeLog 5007 +MD5 101ba08135fb088642f86225bc06ee21 ChangeLog 5292 MD5 34b99bd88fbfefdcb34b683fd7645fad sysklogd-1.4.1-r9.ebuild 1305 -MD5 39526162728783b83aabc6754a6df208 files/syslogd-listfiles 2759 -MD5 1bcc8d6b60987b455f0defec45e0cf0b files/syslog-cron 706 -MD5 a4ca2a78eecd855928cc313d7c243819 files/syslog.conf 2332 -MD5 ee6c8a2e9ce3c67c0704ba954826d828 files/sysklogd-1.4.1-mips.patch 449 -MD5 01d7ea5644c29972a910ab27e3ab4738 files/digest-sysklogd-1.4.1-r10 65 +MD5 2f2c9e67fde6062db025330bdb2b0696 sysklogd-1.4.1-r10.ebuild 1462 +MD5 2f2c9e67fde6062db025330bdb2b0696 sysklogd-1.4.1-r11.ebuild 1462 +MD5 e25d7b583b7e4bd8be503b89e1771e90 files/sysklogd.confd 113 +MD5 7a0ebadad71a8e429d18267a330ca7f5 files/sysklogd.rc6 1589 MD5 5d4b89ceb689887a6cbb582b875bf3e7 files/syslogd-listfiles.8 2540 +MD5 01d7ea5644c29972a910ab27e3ab4738 files/digest-sysklogd-1.4.1-r8 65 MD5 295e4c6eea23fe444002333ffff7b1dc files/sysklogd-1.4.1-2.6.headers.patch 25062 -MD5 da4a916338412ec99b7c4195662c9db6 files/sysklogd.rc6 986 +MD5 a4ca2a78eecd855928cc313d7c243819 files/syslog.conf 2332 +MD5 e1376d40e02cf8026882cd4451267fed files/sysklogd-1.4.1-SO_BSDCOMPAT.patch 2523 +MD5 01d7ea5644c29972a910ab27e3ab4738 files/digest-sysklogd-1.4.1-r10 65 +MD5 1bcc8d6b60987b455f0defec45e0cf0b files/syslog-cron 706 +MD5 ee6c8a2e9ce3c67c0704ba954826d828 files/sysklogd-1.4.1-mips.patch 449 +MD5 39526162728783b83aabc6754a6df208 files/syslogd-listfiles 2759 MD5 01d7ea5644c29972a910ab27e3ab4738 files/digest-sysklogd-1.4.1-r7 65 -MD5 01d7ea5644c29972a910ab27e3ab4738 files/digest-sysklogd-1.4.1-r8 65 MD5 01d7ea5644c29972a910ab27e3ab4738 files/digest-sysklogd-1.4.1-r9 65 -MD5 e1376d40e02cf8026882cd4451267fed files/sysklogd-1.4.1-SO_BSDCOMPAT.patch 2523 -MD5 e25d7b583b7e4bd8be503b89e1771e90 files/sysklogd.confd 113 +MD5 01d7ea5644c29972a910ab27e3ab4738 files/digest-sysklogd-1.4.1-r11 65 diff --git a/app-admin/sysklogd/files/digest-sysklogd-1.4.1-r11 b/app-admin/sysklogd/files/digest-sysklogd-1.4.1-r11 new file mode 100644 index 000000000000..9e53804f2d1c --- /dev/null +++ b/app-admin/sysklogd/files/digest-sysklogd-1.4.1-r11 @@ -0,0 +1 @@ +MD5 d214aa40beabf7bdb0c9b3c64432c774 sysklogd-1.4.1.tar.gz 81784 diff --git a/app-admin/sysklogd/files/sysklogd.rc6 b/app-admin/sysklogd/files/sysklogd.rc6 index 3239fad17bc9..7d6a547e54e3 100644 --- a/app-admin/sysklogd/files/sysklogd.rc6 +++ b/app-admin/sysklogd/files/sysklogd.rc6 @@ -1,35 +1,81 @@ #!/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/sysklogd/files/sysklogd.rc6,v 1.8 2004/07/14 21:18:50 agriffis Exp $ +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/files/sysklogd.rc6,v 1.9 2004/07/24 21:38:37 azarah Exp $ # NB: Config is in /etc/conf.d/sysklogd + depend() { need clock hostname provide logger } -start() { - ebegin "Starting syslogd, klogd" - start-stop-daemon --start --quiet --background --exec /usr/sbin/syslogd \ - -- ${SYSLOGD} +start_daemon() { + local retval=0 + local daemon="$1" + local options="$2" + + [ -z "${daemon}" ] && return 1 + + [ -n "${options}" ] && options="-- ${options}" + + ebegin "sysklogd -> start: ${daemon}" + start-stop-daemon --start --quiet --background \ + --exec /usr/sbin/${daemon} ${options} + retval=$? + eend ${retval} "Failed to start ${daemon}" + + return ${retval} +} + +stop_daemon() { + local retval=0 + local daemon="$1" + + [ -z "${daemon}" ] && return 1 + + ebegin "sysklogd -> stop: ${daemon}" + # syslogd can be stubborn some times (--retry 15)... + start-stop-daemon --stop --oknodo --retry 15 \ + --quiet --pidfile /var/run/${daemon}.pid retval=$? + eend ${retval} "Failed to stop ${daemon}" + + return ${retval} +} + +start() { + start_daemon "syslogd" "${SYSLOGD}" || return 1 # klogd do not always start proper if started too early sleep 1 - start-stop-daemon --start --quiet --exec /usr/sbin/klogd \ - -- ${KLOGD} - retval=$(( ${retval} + $? )) - eend ${retval} "Failed to start syslogd, klogd" + start_daemon "klogd" "${KLOGD}" || { + if [ -n "`pidof syslogd`" ]; then + stop_daemon "syslogd" + fi + return 1 + } + + return 0 } stop() { - ebegin "Stopping syslogd, klogd" - start-stop-daemon --stop --retry 1 --quiet --pidfile /var/run/syslogd.pid - retval=$? - start-stop-daemon --stop --retry 1 --quiet --pidfile /var/run/klogd.pid - retval=$(( ${retval} + $? )) - eend ${retval} "Failed to stop klogd, syslogd" + stop_daemon "klogd" || return 1 + + # Give klogd time to stop + sleep 1 + + stop_daemon "syslogd" || { + if [ -n "`pidof syslogd`" ]; then + # Not sure if we should really try to start + # klogd again ... + start_daemon "klogd" "${KLOGD}" + fi + return 1 + } + + return 0 } + diff --git a/app-admin/sysklogd/sysklogd-1.4.1-r11.ebuild b/app-admin/sysklogd/sysklogd-1.4.1-r11.ebuild new file mode 100644 index 000000000000..ad7b045711c0 --- /dev/null +++ b/app-admin/sysklogd/sysklogd-1.4.1-r11.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/sysklogd-1.4.1-r11.ebuild,v 1.1 2004/07/24 21:38:37 azarah Exp $ + +inherit eutils + +DESCRIPTION="Standard log daemons" +HOMEPAGE="http://www.infodrom.org/projects/sysklogd/" +SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/daemons/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="x86 ppc sparc mips alpha hppa amd64 ia64 ppc64 s390" +IUSE="" + +DEPEND="virtual/libc" +RDEPEND="dev-lang/perl sys-apps/debianutils" +PROVIDE="virtual/logger" + +src_unpack() { + unpack ${A} + + cd ${S} + sed -i "s:-O3:${CFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE:" Makefile + + # Handle SO_BSDCOMPAT being depricated in 2.5+ kernels. + cd ${S}; epatch ${FILESDIR}/${P}-SO_BSDCOMPAT.patch + cd ${S}; epatch ${FILESDIR}/${P}-2.6.headers.patch + + if [ "${ARCH}" = "mips" ] + then + cd ${S} + epatch ${FILESDIR}/${PN}-1.4.1-mips.patch + fi +} + +src_compile() { + emake LDFLAGS="" || die +} + +src_install() { + dosbin syslogd klogd ${FILESDIR}/syslogd-listfiles + doman *.[1-9] ${FILESDIR}/syslogd-listfiles.8 + exeinto /etc/cron.daily + newexe ${FILESDIR}/syslog-cron syslog.cron + dodoc ANNOUNCE CHANGES MANIFEST NEWS README.1st README.linux + dodoc ${FILESDIR}/syslog.conf + insinto /etc + doins ${FILESDIR}/syslog.conf + exeinto /etc/init.d + newexe ${FILESDIR}/sysklogd.rc6 sysklogd + insinto /etc/conf.d + newins ${FILESDIR}/sysklogd.confd sysklogd +} |