summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2000-12-23 00:29:16 +0000
committerDaniel Robbins <drobbins@gentoo.org>2000-12-23 00:29:16 +0000
commitc151750d34c5462b46dbf9bc9b1c0a5768490211 (patch)
treec21119cc0f295ad0ed033a65f5b96af7caba098a /sys-apps/dcron
parentdcron is supervised by default (diff)
downloadgentoo-2-c151750d34c5462b46dbf9bc9b1c0a5768490211.tar.gz
gentoo-2-c151750d34c5462b46dbf9bc9b1c0a5768490211.tar.bz2
gentoo-2-c151750d34c5462b46dbf9bc9b1c0a5768490211.zip
dcron is now complete
Diffstat (limited to 'sys-apps/dcron')
-rw-r--r--sys-apps/dcron/dcron-2.7.ebuild19
-rwxr-xr-xsys-apps/dcron/files/dcron39
-rwxr-xr-xsys-apps/dcron/files/dcron-run2
-rwxr-xr-xsys-apps/dcron/files/log-run2
4 files changed, 60 insertions, 2 deletions
diff --git a/sys-apps/dcron/dcron-2.7.ebuild b/sys-apps/dcron/dcron-2.7.ebuild
index 6577bc56b585..cf4c03ee30fd 100644
--- a/sys-apps/dcron/dcron-2.7.ebuild
+++ b/sys-apps/dcron/dcron-2.7.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Daniel Robbins <drobbins@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/dcron/dcron-2.7.ebuild,v 1.2 2000/12/22 23:14:33 drobbins Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/dcron/dcron-2.7.ebuild,v 1.3 2000/12/23 00:29:11 drobbins Exp $
A=dcron27.tgz
S=${WORKDIR}/dcron
-DESCRIPTION="A cute little cron from Matt Dillon"
+DESCRIPTION="A cute little cron from Matt Dillon (kung-fu master)"
SRC_URI="http://apollo.backplane.com/FreeSrc/${A}"
HOMEPAGE="http://apollo.backplane.com"
@@ -28,5 +28,20 @@ src_install() {
diropts -m0750
dodir /var/spool/cron/crontabs
dodoc CHANGELOG README
+
+ #set up supervise support
+ dodir /etc/svc.d/services/dcron
+ exeinto /etc/svc.d/services/dcron
+ newexe ${FILESDIR}/dcron-run run
+ #this next line tells svcan to start the log process too (and set up a pipe)
+ chmod +t ${D}/etc/svc.d/services/dcron
+ exeinto /etc/svc.d/services/log
+ newexe ${FILESDIR}/log-run run
+ dodir /etc/svc.d/control
+ dosym ../services/dcron /etc/svc.d/control/dcron
+
+ #install rc script
+ exeinto /etc/rc.d/init.d
+ doexe ${FILESDIR}/dcron
}
diff --git a/sys-apps/dcron/files/dcron b/sys-apps/dcron/files/dcron
new file mode 100755
index 000000000000..81103a91d9a2
--- /dev/null
+++ b/sys-apps/dcron/files/dcron
@@ -0,0 +1,39 @@
+#!/bin/sh
+#RCUPDATE:2 3 4:80:This line is required for script management
+
+. /etc/rc.d/config/basic
+. /etc/rc.d/config/functions
+
+SERVICE=dcron
+EXE="/usr/sbin/crond"
+SVCDIR=/etc/svc.d/control/dcron
+opts="start stop"
+
+start() {
+ ebegin "Starting ${SERVICE}"
+ start-stop-daemon --start --quiet --exec $EXE 1>&2
+ eend $? "Error starting ${SERVICE}."
+}
+
+stop() {
+ ebegin "Stopping ${SERVICE}"
+ start-stop-daemon --stop --quiet -u root -n $SERVICE 1>&2
+ eend $? "Error stopping ${SERVICE}."
+}
+
+supervise_start() {
+ ebegin "Starting supervised ${SERVICE}"
+ /usr/bin/svc -u ${SVCDIR}
+ /usr/bin/svc -u ${SVCDIR}/log
+ eend $? "Error starting ${SERVICE} supervised."
+}
+
+supervise_stop() {
+ ebegin "Stopping supervised ${SERVICE}"
+ /usr/bin/svc -d ${SVCDIR}
+ /usr/bin/svc -d ${SVCDIR}/log
+ eend $? "Error stopping ${SERVICE} supervised"
+}
+
+doservice ${@}
+
diff --git a/sys-apps/dcron/files/dcron-run b/sys-apps/dcron/files/dcron-run
new file mode 100755
index 000000000000..7678679ffecc
--- /dev/null
+++ b/sys-apps/dcron/files/dcron-run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/sbin/crond 2>&1 -f
diff --git a/sys-apps/dcron/files/log-run b/sys-apps/dcron/files/log-run
new file mode 100755
index 000000000000..a1482342ca08
--- /dev/null
+++ b/sys-apps/dcron/files/log-run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec multilog t /var/log/dcron.d