From: Wolfram Schlich Date: Tue, 20 Jun 2006 19:44:58 +0000 (+0000) Subject: fixing doc file installation, new init script supporting multiple instances (like... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b1d23e7e2211dbcf5eb3db2f768341e2abe0920;p=gentoo.git fixing doc file installation, new init script supporting multiple instances (like the openvpn one) Package-Manager: portage-2.1_rc4-r1 --- diff --git a/sys-process/fcron/ChangeLog b/sys-process/fcron/ChangeLog index 89fa550af721..39b071f4b4f5 100644 --- a/sys-process/fcron/ChangeLog +++ b/sys-process/fcron/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-process/fcron # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/ChangeLog,v 1.13 2006/04/27 23:26:04 antarus Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/ChangeLog,v 1.14 2006/06/20 19:44:58 wschlich Exp $ + +*fcron-3.0.1-r1 (20 Jun 2006) + + 20 Jun 2006; Wolfram Schlich +files/fcron.init, + +fcron-3.0.1-r1.ebuild: + fixing doc file installation, new init script supporting multiple instances + (like the openvpn one) 27 Apr 2006; Alec Warner files/digest-fcron-2.0.2, files/digest-fcron-2.9.5.1, files/digest-fcron-2.9.7, diff --git a/sys-process/fcron/Manifest b/sys-process/fcron/Manifest index 7bcdb4afa090..f1be0d71bd49 100644 --- a/sys-process/fcron/Manifest +++ b/sys-process/fcron/Manifest @@ -1,49 +1,57 @@ -AUX crontab 832 RMD160 ac7e347d5cedccec74ad7301fb20857ac30a4df0 SHA1 bc8c0f0ea498a97c0533c815511a13bb933d5cc9 SHA256 052c8cfefc9d801cc7a1619e6932264d35c4f076b4fa3225791a91809ce49a59 size 832 +AUX crontab 832 RMD160 ac7e347d5cedccec74ad7301fb20857ac30a4df0 SHA1 bc8c0f0ea498a97c0533c815511a13bb933d5cc9 SHA256 052c8cfefc9d801cc7a1619e6932264d35c4f076b4fa3225791a91809ce49a59 MD5 92d3b4a42f3e88041e50bb552b9104fd files/crontab 832 RMD160 ac7e347d5cedccec74ad7301fb20857ac30a4df0 files/crontab 832 SHA256 052c8cfefc9d801cc7a1619e6932264d35c4f076b4fa3225791a91809ce49a59 files/crontab 832 -AUX fcron-2.0.0-configure.diff 716 RMD160 e50fbd501e1a3419e8a4c0dea748951b719cc019 SHA1 f2b851ebd40d458779a9199444351f19fd0421f9 SHA256 6b5fa1bad1a64e0af09b963887b6ffca8afb19f63e955f16baa82c55f11e9c3c size 716 +AUX fcron-2.0.0-configure.diff 716 RMD160 e50fbd501e1a3419e8a4c0dea748951b719cc019 SHA1 f2b851ebd40d458779a9199444351f19fd0421f9 SHA256 6b5fa1bad1a64e0af09b963887b6ffca8afb19f63e955f16baa82c55f11e9c3c MD5 cb4f2a8ba719a085eaa3b67918fbd0f5 files/fcron-2.0.0-configure.diff 716 RMD160 e50fbd501e1a3419e8a4c0dea748951b719cc019 files/fcron-2.0.0-configure.diff 716 SHA256 6b5fa1bad1a64e0af09b963887b6ffca8afb19f63e955f16baa82c55f11e9c3c files/fcron-2.0.0-configure.diff 716 -AUX fcron-2.9.5.1-fix-mail-output.diff 415 RMD160 52ebf91af0ad51548586ee52c8dea8d0d51fe7ec SHA1 742604340d9f82f1a4ef57824d0281de3dbc9268 SHA256 74312697660a07fab97d0f4e19b656b99195a22e967a2309d158b53d5308dd24 size 415 +AUX fcron-2.9.5.1-fix-mail-output.diff 415 RMD160 52ebf91af0ad51548586ee52c8dea8d0d51fe7ec SHA1 742604340d9f82f1a4ef57824d0281de3dbc9268 SHA256 74312697660a07fab97d0f4e19b656b99195a22e967a2309d158b53d5308dd24 MD5 e87691832e6f48a5aed1c6cf3b681bce files/fcron-2.9.5.1-fix-mail-output.diff 415 RMD160 52ebf91af0ad51548586ee52c8dea8d0d51fe7ec files/fcron-2.9.5.1-fix-mail-output.diff 415 SHA256 74312697660a07fab97d0f4e19b656b99195a22e967a2309d158b53d5308dd24 files/fcron-2.9.5.1-fix-mail-output.diff 415 -AUX fcron.rc6 732 RMD160 c06263fd78998360780ec55df8bd08bd9332f705 SHA1 2308179d6630c614f1789d473f4ffcf8cced17e9 SHA256 4ce3a3395ce032c3e21594211055dd038153f506ba54f0008850d43bba01fa6e size 732 +AUX fcron.init 1549 RMD160 6bd158091d8a20cc15cd236d19746a4b39fbef9a SHA1 42a8fdab04571e71b8d62914ff494713c156245c SHA256 a5f24eca50f36af76a8aa3f2143543271543601dcba85f753474e222cabbe7f5 +MD5 a75a0d0c3e3d8b82350e489ec1cc1b62 files/fcron.init 1549 +RMD160 6bd158091d8a20cc15cd236d19746a4b39fbef9a files/fcron.init 1549 +SHA256 a5f24eca50f36af76a8aa3f2143543271543601dcba85f753474e222cabbe7f5 files/fcron.init 1549 +AUX fcron.rc6 732 RMD160 c06263fd78998360780ec55df8bd08bd9332f705 SHA1 2308179d6630c614f1789d473f4ffcf8cced17e9 SHA256 4ce3a3395ce032c3e21594211055dd038153f506ba54f0008850d43bba01fa6e MD5 69137c81685b56b4e3195203a14bbb8b files/fcron.rc6 732 RMD160 c06263fd78998360780ec55df8bd08bd9332f705 files/fcron.rc6 732 SHA256 4ce3a3395ce032c3e21594211055dd038153f506ba54f0008850d43bba01fa6e files/fcron.rc6 732 -DIST fcron-2.0.2.src.tar.gz 169081 RMD160 2eb8c0890c2d97d3e16b7ca7c453ee2f97c65b75 SHA256 aff43e96f6b252f4f56f155190a494b3bd95adb61b881ddfc2bd1cda9e71b77e size 169081 -DIST fcron-2.9.5.1.src.tar.gz 398400 RMD160 05adef20321957eb6bc2167c82ae88c8d9a64182 SHA256 decc81f189f3d2e3caaeb7649f34171a524f654eb929b7243410cfb5f26c7c20 size 398400 -DIST fcron-2.9.7.src.tar.gz 408864 RMD160 1068fde79e72eaedc8e60d50053cd0950c9c1778 SHA256 05662ff1c07b7f07dad79f3f060fc77ae4a0fc2463965b0b9802a4d58ebb7d04 size 408864 -DIST fcron-3.0.0.src.tar.gz 409015 RMD160 e0d29f5cce81a4e184c3be96005a681edd885a74 SHA256 861e0ea68525f960e512aaebbc09d5848a9862982038a14a3e65c9e74ff2650e size 409015 -DIST fcron-3.0.1.src.tar.gz 536972 RMD160 1b723f563b1340a5091f559e7f0c2eed7f8ee5ff SHA256 31288b04619bb9c7cd5fe6ff004c1e2c1340685cec2d0fa8725259c491699de9 size 536972 -EBUILD fcron-2.0.2.ebuild 3132 RMD160 e9a6eadedc846db89c111dd3cd55a4721c441795 SHA1 98a4265487b0c1966c7c30eddbd5d206e7e02c27 SHA256 2c54fb775121d8587cdb0d8d94149f5400824d12e207e33997b8705a3901f7e6 size 3132 +DIST fcron-2.0.2.src.tar.gz 169081 RMD160 2eb8c0890c2d97d3e16b7ca7c453ee2f97c65b75 SHA256 aff43e96f6b252f4f56f155190a494b3bd95adb61b881ddfc2bd1cda9e71b77e +DIST fcron-2.9.5.1.src.tar.gz 398400 RMD160 05adef20321957eb6bc2167c82ae88c8d9a64182 SHA256 decc81f189f3d2e3caaeb7649f34171a524f654eb929b7243410cfb5f26c7c20 +DIST fcron-2.9.7.src.tar.gz 408864 RMD160 1068fde79e72eaedc8e60d50053cd0950c9c1778 SHA256 05662ff1c07b7f07dad79f3f060fc77ae4a0fc2463965b0b9802a4d58ebb7d04 +DIST fcron-3.0.0.src.tar.gz 409015 RMD160 e0d29f5cce81a4e184c3be96005a681edd885a74 SHA256 861e0ea68525f960e512aaebbc09d5848a9862982038a14a3e65c9e74ff2650e +DIST fcron-3.0.1.src.tar.gz 536972 RMD160 1b723f563b1340a5091f559e7f0c2eed7f8ee5ff SHA1 2c4bb80af3816fad20b6cd1f833d23dd3085328b SHA256 31288b04619bb9c7cd5fe6ff004c1e2c1340685cec2d0fa8725259c491699de9 +EBUILD fcron-2.0.2.ebuild 3132 RMD160 e9a6eadedc846db89c111dd3cd55a4721c441795 SHA1 98a4265487b0c1966c7c30eddbd5d206e7e02c27 SHA256 2c54fb775121d8587cdb0d8d94149f5400824d12e207e33997b8705a3901f7e6 MD5 c1d0a2ed938718f4afbebd7581e4dbf4 fcron-2.0.2.ebuild 3132 RMD160 e9a6eadedc846db89c111dd3cd55a4721c441795 fcron-2.0.2.ebuild 3132 SHA256 2c54fb775121d8587cdb0d8d94149f5400824d12e207e33997b8705a3901f7e6 fcron-2.0.2.ebuild 3132 -EBUILD fcron-2.9.5.1.ebuild 3402 RMD160 49c995968b08bab66352e74bfba87436fa8fac20 SHA1 00eead25092a829626b86fd2262219a276c4fa86 SHA256 2a4dd30b8b5446ac71f9160e232c03634bc9ff3ef5943ad9086341784816c185 size 3402 +EBUILD fcron-2.9.5.1.ebuild 3402 RMD160 49c995968b08bab66352e74bfba87436fa8fac20 SHA1 00eead25092a829626b86fd2262219a276c4fa86 SHA256 2a4dd30b8b5446ac71f9160e232c03634bc9ff3ef5943ad9086341784816c185 MD5 013d69a3c71c5685c3c5cb79262dea8d fcron-2.9.5.1.ebuild 3402 RMD160 49c995968b08bab66352e74bfba87436fa8fac20 fcron-2.9.5.1.ebuild 3402 SHA256 2a4dd30b8b5446ac71f9160e232c03634bc9ff3ef5943ad9086341784816c185 fcron-2.9.5.1.ebuild 3402 -EBUILD fcron-2.9.7.ebuild 2924 RMD160 a4a12f9cd3936e4aa7fcb5d201360e285f853adf SHA1 da53eb975d67460a654bb27d866322c0fd5c0398 SHA256 65850cdbccaf79a505a37891162b348984ee0184c27e5c840c7e6a36b51179d1 size 2924 +EBUILD fcron-2.9.7.ebuild 2924 RMD160 a4a12f9cd3936e4aa7fcb5d201360e285f853adf SHA1 da53eb975d67460a654bb27d866322c0fd5c0398 SHA256 65850cdbccaf79a505a37891162b348984ee0184c27e5c840c7e6a36b51179d1 MD5 c5be641f3ac32d16043211c7f2d39af3 fcron-2.9.7.ebuild 2924 RMD160 a4a12f9cd3936e4aa7fcb5d201360e285f853adf fcron-2.9.7.ebuild 2924 SHA256 65850cdbccaf79a505a37891162b348984ee0184c27e5c840c7e6a36b51179d1 fcron-2.9.7.ebuild 2924 -EBUILD fcron-3.0.0.ebuild 3838 RMD160 5cefa9c7252650ef4ab863b8b9275ebab0cdb595 SHA1 1ad1dbcbe1703631c1ccb7bfef7e6561ac1468e6 SHA256 24f15c623168acca753dd1afe91db8e445dbadcfd0c8f590f7b400c56557e79e size 3838 +EBUILD fcron-3.0.0.ebuild 3838 RMD160 5cefa9c7252650ef4ab863b8b9275ebab0cdb595 SHA1 1ad1dbcbe1703631c1ccb7bfef7e6561ac1468e6 SHA256 24f15c623168acca753dd1afe91db8e445dbadcfd0c8f590f7b400c56557e79e MD5 408cf7853db54e652cee61c2adef1bd0 fcron-3.0.0.ebuild 3838 RMD160 5cefa9c7252650ef4ab863b8b9275ebab0cdb595 fcron-3.0.0.ebuild 3838 SHA256 24f15c623168acca753dd1afe91db8e445dbadcfd0c8f590f7b400c56557e79e fcron-3.0.0.ebuild 3838 -EBUILD fcron-3.0.1.ebuild 3836 RMD160 7812dd0dc74ffad8efd62716984f8f7d73b4dd71 SHA1 72a4e4c95ea320f31409ed73ad598bd5b2fe7ddd SHA256 a02be0a730acb5e8d240796477baf322275cf3b02a9584fb5a1f950fbb2f652e size 3836 +EBUILD fcron-3.0.1-r1.ebuild 4210 RMD160 965193d9314ec3443410b5eeb6b0fb733e711014 SHA1 3d45f2f5d9399d04c09b5ad2835147dddef2129a SHA256 27a18a411f2be8137d0aeaddf0990d3778c4b1c98257cdfd5ae94c5b353aadce +MD5 be7febef630eb8edf843e939450d171a fcron-3.0.1-r1.ebuild 4210 +RMD160 965193d9314ec3443410b5eeb6b0fb733e711014 fcron-3.0.1-r1.ebuild 4210 +SHA256 27a18a411f2be8137d0aeaddf0990d3778c4b1c98257cdfd5ae94c5b353aadce fcron-3.0.1-r1.ebuild 4210 +EBUILD fcron-3.0.1.ebuild 3836 RMD160 7812dd0dc74ffad8efd62716984f8f7d73b4dd71 SHA1 72a4e4c95ea320f31409ed73ad598bd5b2fe7ddd SHA256 a02be0a730acb5e8d240796477baf322275cf3b02a9584fb5a1f950fbb2f652e MD5 2c1ec7c8a32cf36107b12ba97d732b4d fcron-3.0.1.ebuild 3836 RMD160 7812dd0dc74ffad8efd62716984f8f7d73b4dd71 fcron-3.0.1.ebuild 3836 SHA256 a02be0a730acb5e8d240796477baf322275cf3b02a9584fb5a1f950fbb2f652e fcron-3.0.1.ebuild 3836 -MISC ChangeLog 10125 RMD160 97ab0755efceefacd45f5e45cf9be7cbbae192cf SHA1 7266988a7ec4db891e1b8b09ae2041298b43da98 SHA256 4c99ca63c69c7ac94934fa489f6bf8fd81797f75476b713c359a36694bcb4b58 size 10125 -MD5 dc8e954a685c2586b6ba26c0f47cf8d2 ChangeLog 10125 -RMD160 97ab0755efceefacd45f5e45cf9be7cbbae192cf ChangeLog 10125 -SHA256 4c99ca63c69c7ac94934fa489f6bf8fd81797f75476b713c359a36694bcb4b58 ChangeLog 10125 -MISC metadata.xml 251 RMD160 8332f1e2f5fe2cb397118e059139f4db260f8b06 SHA1 7c27e1ab88d1da6b91b8c74300930d9ee473734f SHA256 cda274cd7d0522ef68a987c200504e1f068babdd7d8da0d77ee9cde0e10772e2 size 251 +MISC ChangeLog 10359 RMD160 1542d4ed20f03fa45d08a922ed6f3d2c117e5c55 SHA1 209478abef7e2eedc39ab9c48df9af4e3aec04a9 SHA256 0c966044c54d4f0f78c7661bafd3dfc5673cc5a2a54e31a8b7a4c874958d2bc8 +MD5 e0732bec5e6fff89f477f2d585d29007 ChangeLog 10359 +RMD160 1542d4ed20f03fa45d08a922ed6f3d2c117e5c55 ChangeLog 10359 +SHA256 0c966044c54d4f0f78c7661bafd3dfc5673cc5a2a54e31a8b7a4c874958d2bc8 ChangeLog 10359 +MISC metadata.xml 251 RMD160 8332f1e2f5fe2cb397118e059139f4db260f8b06 SHA1 7c27e1ab88d1da6b91b8c74300930d9ee473734f SHA256 cda274cd7d0522ef68a987c200504e1f068babdd7d8da0d77ee9cde0e10772e2 MD5 bd1deeb53b2b8e05397238a5479c74cc metadata.xml 251 RMD160 8332f1e2f5fe2cb397118e059139f4db260f8b06 metadata.xml 251 SHA256 cda274cd7d0522ef68a987c200504e1f068babdd7d8da0d77ee9cde0e10772e2 metadata.xml 251 @@ -62,3 +70,6 @@ SHA256 317878e99cf0cec3779ee7b0c176ae2046982dd62c436221c7f7d46211850ea7 files/di MD5 14a48609fdf147cc10aef17c336cc6aa files/digest-fcron-3.0.1 247 RMD160 e979c7a5d8fe531293193369fc4914addec3e1a0 files/digest-fcron-3.0.1 247 SHA256 14534509d40edfeb8fc3cb150d56dbbef3f2082bbeb2f71530a8de266cba1f75 files/digest-fcron-3.0.1 247 +MD5 14a48609fdf147cc10aef17c336cc6aa files/digest-fcron-3.0.1-r1 247 +RMD160 e979c7a5d8fe531293193369fc4914addec3e1a0 files/digest-fcron-3.0.1-r1 247 +SHA256 14534509d40edfeb8fc3cb150d56dbbef3f2082bbeb2f71530a8de266cba1f75 files/digest-fcron-3.0.1-r1 247 diff --git a/sys-process/fcron/fcron-3.0.1-r1.ebuild b/sys-process/fcron/fcron-3.0.1-r1.ebuild new file mode 100644 index 000000000000..b0d2b5bfcb45 --- /dev/null +++ b/sys-process/fcron/fcron-3.0.1-r1.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/fcron-3.0.1-r1.ebuild,v 1.1 2006/06/20 19:44:58 wschlich Exp $ + +inherit cron pam eutils + +DESCRIPTION="A command scheduler with extended capabilities over cron and anacron" +HOMEPAGE="http://fcron.free.fr/" +SRC_URI="http://fcron.free.fr/archives/${P}.src.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~x86 ~ppc ~sparc ~mips ~hppa ~amd64" +IUSE="debug doc pam selinux" + +DEPEND="virtual/editor + doc? ( >=app-text/docbook-dsssl-stylesheets-1.77 ) + selinux? ( sys-libs/libselinux ) + pam? ( >=sys-libs/pam-0.77 )" + +pkg_setup() { + # sudo unsets EDITOR + if [[ -z "${EDITOR}" ]] ; then + eerror "EDITOR seems to be unset. If you use sudo, it may be the cause." + eerror "Try using 'sudo env EDITOR=\${EDITOR} emerge' instead." + die "Please set the EDITOR env variable to the path of a valid executable." + fi + + # bug #65263 + # fcron's ./configure complains if EDITOR is not set to an absolute path, + # so try to set it to the abs path if it isn't + if [[ "${EDITOR}" != */* ]] ; then + einfo "Attempting to deduce absolute path of ${EDITOR}" + EDITOR=$(which ${EDITOR} 2>/dev/null) + [[ -x "${EDITOR}" ]] || \ + die "Please set the EDITOR env variable to the path of a valid executable." + fi + + ROOTUSER=$(egetent passwd 0 | cut -d':' -f1) + ROOTGROUP=$(egetent group 0 | cut -d':' -f1) +} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PN}-2.0.0-configure.diff + # respect LDFLAGS + sed -i "s:\(@LIBS@\):\$(LDFLAGS) \1:" Makefile.in || die "sed failed" +} + +src_compile() { + local myconf + + autoconf || die "autoconf failed" + + use doc && \ + myconf="${myconf} --with-dsssl-dir=/usr/share/sgml/stylesheets/dsssl/docbook" + + [[ -n "${ROOTUSER}" ]] && myconf="${myconf} --with-rootname=${ROOTUSER}" + [[ -n "${ROOTGROUP}" ]] && myconf="${myconf} --with-rootgroup=${ROOTGROUP}" + + # QA security notice fix; see "[gentoo-core] Heads up changes in suid + # handing with portage >=51_pre21" for more details. + append-ldflags $(bindnow-flags) + + econf \ + $(use_with pam) \ + $(use_with selinux) \ + $(use_with debug) \ + --with-username=cron \ + --with-groupname=cron \ + --with-piddir=/var/run \ + --with-etcdir=/etc/fcron \ + --with-spooldir=/var/spool/cron \ + --with-fifodir=/var/run \ + --with-sendmail=/usr/sbin/sendmail \ + --with-fcrondyn=yes \ + --with-editor=${EDITOR} \ + --with-shell=/bin/sh \ + ${myconf} \ + || die "Configure problem" + + emake || die "Compile problem" +} + +src_install() { + docrondir /var/spool/cron/fcrontabs -m0770 -o cron -g cron + docron fcron -m0110 -o ${ROOTUSER:-root} -g ${ROOTGROUP:-root} + docrontab fcrontab -m6110 -o cron -g cron + + insinto /usr/bin + insopts -o ${ROOTUSER:-root} -g cron -m6110 ; doins fcronsighup + insopts -o cron -g cron -m6110 ; doins fcrondyn + + # /etc stuff + insinto /etc/fcron + insopts -m 640 -o ${ROOTUSER:-root} -g cron + doins files/fcron.{allow,deny,conf} + dosed 's:^\(fcrontabs.*=.*\)$:\1/fcrontabs:' /etc/fcron/fcron.conf \ + || die "dosed fcron.conf failed" + + newpamd files/fcron.pam fcron + newpamd files/fcrontab.pam fcrontab + + insinto /etc + doins ${FILESDIR}/crontab + + newinitd ${FILESDIR}/fcron.init fcron || die "newinitd failed" + + # doc stuff + dodoc MANIFEST VERSION script/check_system_crontabs + newdoc files/fcron.conf fcron.conf.sample + dodoc ${FILESDIR}/crontab + dodoc doc/en/txt/{readme,thanks,faq,todo,relnotes,changes}.txt + doman doc/en/man/*.[0-9] + use doc && dohtml doc/en/HTML/*.html + + # localized docs + local LANGUAGES=$(sed -n 's:LANGUAGES =::p' doc/Makefile) + LANGUAGES="${LANGUAGES/en/}" + local lang + for lang in ${LANGUAGES}; do + hasq ${lang} ${LINGUAS} || continue + doman -i18n=${lang} doc/${lang}/man/*.[0-9] + use doc && docinto html/${lang} && dohtml doc/${lang}/HTML/*.html + done +} + +pkg_postinst() { + einfo "Each user who uses fcron should be added to the cron group" + einfo "in /etc/group and also be added in /etc/fcron/fcron.allow" + einfo + einfo "It is possible to emulate vixie-cron's behavior with regards to /etc/crontab" + einfo "and /etc/cron.d. To do so, read the directions provided in the script," + einfo "/usr/share/doc/${PF}/check_system_crontabs.gz." + cron_pkg_postinst +} diff --git a/sys-process/fcron/files/digest-fcron-3.0.1-r1 b/sys-process/fcron/files/digest-fcron-3.0.1-r1 new file mode 100644 index 000000000000..59c004866df2 --- /dev/null +++ b/sys-process/fcron/files/digest-fcron-3.0.1-r1 @@ -0,0 +1,3 @@ +MD5 8e5dcb3a646c11294294895954ef0a48 fcron-3.0.1.src.tar.gz 536972 +RMD160 1b723f563b1340a5091f559e7f0c2eed7f8ee5ff fcron-3.0.1.src.tar.gz 536972 +SHA256 31288b04619bb9c7cd5fe6ff004c1e2c1340685cec2d0fa8725259c491699de9 fcron-3.0.1.src.tar.gz 536972 diff --git a/sys-process/fcron/files/fcron.init b/sys-process/fcron/files/fcron.init new file mode 100755 index 000000000000..61a2ed1666dd --- /dev/null +++ b/sys-process/fcron/files/fcron.init @@ -0,0 +1,50 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/files/fcron.init,v 1.1 2006/06/20 19:44:58 wschlich Exp $ + +depend() { + use logger slapd mysql postgresql + need clock hostname + # provide the cron service if we are the main instance + if [ "${SVCNAME}" == "fcron" ]; then + provide cron + fi +} + +checkconfig() { + FCRON_INSTANCE=${SVCNAME##*.} + if [[ -n "${FCRON_INSTANCE}" && "${SVCNAME}" != "fcron" ]]; then + FCRON_CONF=/etc/fcron/fcron.${FCRON_INSTANCE}.conf + else + FCRON_CONF=/etc/fcron/fcron.conf + fi + if [ ! -e ${FCRON_CONF} ]; then + eerror "You will need an ${FCRON_CONF} first" + eerror "There is a sample in /etc/fcron" + return 1 + fi + FCRON_PIDFILE=$(grep '^pidfile' ${FCRON_CONF} 2>/dev/null | sed -e 's:^pidfile\s*=\s*\(.*\)$:\1:') + FCRON_PIDFILE=${FCRON_PIDFILE:-/var/run/fcron.pid} + FCRON_SPOOLDIR=$(grep '^fcrontabs' ${FCRON_CONF} 2>/dev/null | sed -e 's:^fcrontabs\s*=\s*\(.*\)$:\1:') + FCRON_SPOOLDIR=${FCRON_SPOOLDIR:-/var/spool/cron/fcrontabs} + if [ ! -d ${FCRON_SPOOLDIR} ]; then + ebegin "Creating missing spooldir ${FCRON_SPOOLDIR}" + /usr/sbin/fcron --newspooldir ${FCRON_SPOOLDIR} + eend $? + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --pidfile ${FCRON_PIDFILE} --exec /usr/sbin/fcron -- -c ${FCRON_CONF} + eend $? +} + +stop() { + checkconfig || return 1 + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile ${FCRON_PIDFILE} + eend $? +}