diff options
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/runit/Makefile | 58 | ||||
-rw-r--r-- | sysutils/runit/distinfo | 1 | ||||
-rw-r--r-- | sysutils/runit/files/runsvdir.sh.in | 23 | ||||
-rw-r--r-- | sysutils/runit/pkg-descr | 12 | ||||
-rw-r--r-- | sysutils/runit/pkg-plist | 44 |
6 files changed, 139 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 43676269193c..94ce3c411eb9 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -236,6 +236,7 @@ SUBDIR += ruby-devel-logger SUBDIR += ruby-log4r SUBDIR += ruby-quota + SUBDIR += runit SUBDIR += safecat SUBDIR += samefile SUBDIR += sarah diff --git a/sysutils/runit/Makefile b/sysutils/runit/Makefile new file mode 100644 index 000000000000..4f26b931e406 --- /dev/null +++ b/sysutils/runit/Makefile @@ -0,0 +1,58 @@ +# New ports collection makefile for: runit +# Date created: 2003-06-20 +# Whom: Sergei Kolobov <sergei@kolobov.com> +# +# $FreeBSD$ +# + +PORTNAME= runit +PORTVERSION= 0.10.0 +CATEGORIES= sysutils +MASTER_SITES= http://smarden.org/${PORTNAME}/ + +MAINTAINER= sergei@kolobov.com +COMMENT= A init scheme with service supervision + +WRKSRC= ${WRKDIR}/admin/${DISTNAME} +ALL_TARGET= default + +SERVICE_DIR?= /var/service + +MAN8= runit-init.8 runit.8 runsv.8 runsvchdir.8 runsvctrl.8 \ + runsvdir.8 runsvstat.8 svlogd.8 svwaitdown.8 svwaitup.8 \ + utmpset.8 +DOCS= package/CHANGES package/COPYING package/README \ + package/THANKS doc/*.html +CONFIG= etc/freebsd/1 etc/2 etc/freebsd/3 etc/freebsd/ctrlaltdel \ + etc/freebsd/getty-ttyv4/run etc/freebsd/getty-ttyv4/finish + +do-configure: + ${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/src/conf-cc + +do-build: + cd ${WRKSRC} && package/compile + @${MKDIR} ${WRKDIR}/etc/getty-ttyv4 + @${SED} -e 's!%%PREFIX%%!${PREFIX}!' \ + -e 's!%%SERVICE_DIR%%!${SERVICE_DIR}!' \ + ${FILESDIR}/runsvdir.sh.in > ${WRKDIR}/runsvdir.sh.sample +.for file in ${CONFIG} + @${SED} -e 's!/etc/runit!${PREFIX}/etc/runit!g' \ + -e 's!/service!${SERVICE_DIR}!g' \ + -e 's!/usr/local!${PREFIX}!g' \ + ${WRKSRC}/${file} > ${WRKDIR}/${file:S!freebsd/!!}.sample +.endfor + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/command/* ${PREFIX}/sbin + cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN8} ${MANPREFIX}/man/man8 + ${INSTALL_SCRIPT} ${WRKDIR}/runsvdir.sh.sample ${PREFIX}/etc/rc.d + @${MKDIR} ${PREFIX}/etc/runit/getty-ttyv4 + ${INSTALL_SCRIPT} ${WRKDIR}/etc/[123c]* ${PREFIX}/etc/runit + ${INSTALL_SCRIPT} ${WRKDIR}/etc/getty-ttyv4/* \ + ${PREFIX}/etc/runit/getty-ttyv4 +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/sysutils/runit/distinfo b/sysutils/runit/distinfo new file mode 100644 index 000000000000..5a81edf304b2 --- /dev/null +++ b/sysutils/runit/distinfo @@ -0,0 +1 @@ +MD5 (runit-0.10.0.tar.gz) = de22a4916f31ab81c27f265f81c7ad61 diff --git a/sysutils/runit/files/runsvdir.sh.in b/sysutils/runit/files/runsvdir.sh.in new file mode 100644 index 000000000000..eba2a9e993e7 --- /dev/null +++ b/sysutils/runit/files/runsvdir.sh.in @@ -0,0 +1,23 @@ +#!/bin/sh +DAEMON=runsvdir +PREFIX=%%PREFIX%% +SVDIR=%%SERVICE_DIR%% +LOG='...........................................................................................................................................................................................................................................................................................................................................................................................................' + +PATH=/command:${PREFIX}/sbin:${PREFIX}/bin:/usr/sbin:/usr/bin:/sbin:/bin + +case "$1" in + start) + echo -n " ${DAEMON}" + exec env - PATH=${PATH} ${PREFIX}/sbin/${DAEMON} $SVDIR $LOG & + ;; + + stop) + echo -n " ${DAEMON}" + /usr/bin/killall -HUP ${DAEMON} + ;; + + *) + echo "Usage: $0 start | stop" + ;; +esac diff --git a/sysutils/runit/pkg-descr b/sysutils/runit/pkg-descr new file mode 100644 index 000000000000..9a39cf650082 --- /dev/null +++ b/sysutils/runit/pkg-descr @@ -0,0 +1,12 @@ +runit is daemontools replacement: +- service supervision +- clean process state +- reliable logging facility +- fast system bootup and shutdown +- packaging friendly +- small code size + +It can optionally replace init(8) as process 1. + +Author: Gerrit Pape <pape@smarden.org> +WWW: http://smarden.org/runit/ diff --git a/sysutils/runit/pkg-plist b/sysutils/runit/pkg-plist new file mode 100644 index 000000000000..3b68372bb20f --- /dev/null +++ b/sysutils/runit/pkg-plist @@ -0,0 +1,44 @@ +etc/rc.d/runsvdir.sh.sample +etc/runit/1.sample +etc/runit/2.sample +etc/runit/3.sample +etc/runit/ctrlaltdel.sample +etc/runit/getty-ttyv4/run.sample +etc/runit/getty-ttyv4/finish.sample +sbin/runit +sbin/runit-init +sbin/runsv +sbin/runsvchdir +sbin/runsvctrl +sbin/runsvdir +sbin/runsvstat +sbin/svlogd +sbin/svwaitdown +sbin/svwaitup +sbin/utmpset +%%PORTDOCS%%%%DOCSDIR%%/CHANGES +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/THANKS +%%PORTDOCS%%%%DOCSDIR%%/benefits.html +%%PORTDOCS%%%%DOCSDIR%%/dependencies.html +%%PORTDOCS%%%%DOCSDIR%%/index.html +%%PORTDOCS%%%%DOCSDIR%%/install.html +%%PORTDOCS%%%%DOCSDIR%%/replaceinit.html +%%PORTDOCS%%%%DOCSDIR%%/runit-init.8.html +%%PORTDOCS%%%%DOCSDIR%%/runit.8.html +%%PORTDOCS%%%%DOCSDIR%%/runlevels.html +%%PORTDOCS%%%%DOCSDIR%%/runscripts.html +%%PORTDOCS%%%%DOCSDIR%%/runsv.8.html +%%PORTDOCS%%%%DOCSDIR%%/runsvchdir.8.html +%%PORTDOCS%%%%DOCSDIR%%/runsvctrl.8.html +%%PORTDOCS%%%%DOCSDIR%%/runsvdir.8.html +%%PORTDOCS%%%%DOCSDIR%%/runsvstat.8.html +%%PORTDOCS%%%%DOCSDIR%%/svlogd.8.html +%%PORTDOCS%%%%DOCSDIR%%/svwaitdown.8.html +%%PORTDOCS%%%%DOCSDIR%%/svwaitup.8.html +%%PORTDOCS%%%%DOCSDIR%%/upgrade.html +%%PORTDOCS%%%%DOCSDIR%%/usedietlibc.html +%%PORTDOCS%%%%DOCSDIR%%/useinit.html +%%PORTDOCS%%%%DOCSDIR%%/utmpset.8.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% |