aboutsummaryrefslogtreecommitdiff
path: root/sysutils/runit
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2013-10-30 16:25:29 +0000
committerChris Rees <crees@FreeBSD.org>2013-10-30 16:25:29 +0000
commit6759731c83d82b9713a1da86bc9e2afc4e2629c9 (patch)
tree98141fafbe6ab54f57038901f8c58683620f0358 /sysutils/runit
parentc637c4ecd008d27f5ca4f0a744e85284f474ad29 (diff)
Notes
Diffstat (limited to 'sysutils/runit')
-rw-r--r--sysutils/runit/Makefile28
-rw-r--r--sysutils/runit/files/runsvdir.in22
-rw-r--r--sysutils/runit/pkg-descr2
-rw-r--r--sysutils/runit/pkg-plist13
4 files changed, 28 insertions, 37 deletions
diff --git a/sysutils/runit/Makefile b/sysutils/runit/Makefile
index 90721e313e52..ec77c4754785 100644
--- a/sysutils/runit/Makefile
+++ b/sysutils/runit/Makefile
@@ -20,16 +20,14 @@ SERVICE_DIR?= /var/service
SUB_LIST= SERVICE_DIR="${SERVICE_DIR}"
PORTDOCS= *
-MAN8= chpst.8 runit-init.8 runit.8 runsv.8 runsvchdir.8 \
- runsvdir.8 sv.8 svlogd.8 utmpset.8
DOCS= package/CHANGES 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
-NO_STAGE= yes
do-configure:
${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/src/conf-cc
+ ${ECHO_CMD} "${CC}" > ${WRKSRC}/src/conf-ld
do-build:
cd ${WRKSRC} && package/compile && package/check
@@ -42,25 +40,15 @@ do-build:
.endfor
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/command/* ${PREFIX}/sbin
-.for man in ${MAN8}
- @${INSTALL_MAN} ${WRKSRC}/man/${man} ${MAN8PREFIX}/man/man8
-.endfor
- @${MKDIR} ${ETCDIR}/getty-ttyv4
- @${INSTALL_SCRIPT} ${WRKDIR}/etc/[123c]* ${ETCDIR}
+ @${INSTALL_PROGRAM} ${WRKSRC}/command/* ${STAGEDIR}${PREFIX}/sbin
+ @${INSTALL_MAN} ${WRKSRC}/man/* ${STAGEDIR}${PREFIX}/man/man8/
+ @${MKDIR} ${STAGEDIR}${ETCDIR}/getty-ttyv4
+ @${INSTALL_SCRIPT} ${WRKDIR}/etc/[123c]* ${STAGEDIR}${ETCDIR}
@${INSTALL_SCRIPT} ${WRKDIR}/etc/getty-ttyv4/* \
- ${ETCDIR}/getty-ttyv4
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
+ ${STAGEDIR}${ETCDIR}/getty-ttyv4
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
. for doc in ${DOCS}
- @${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
. endfor
-.endif
-
-post-install:
- @for file in ${ETCDIR}/*.sample ${ETCDIR}/getty-ttyv4/*.sample ; \
- do [ ! -f ${ETCDIR}/$${file%.sample} ] \
- && ${CP} -p $${file} $${file%.sample} ; \
- done
.include <bsd.port.mk>
diff --git a/sysutils/runit/files/runsvdir.in b/sysutils/runit/files/runsvdir.in
index 69e5e8e9aa62..a4fc2f42d717 100644
--- a/sysutils/runit/files/runsvdir.in
+++ b/sysutils/runit/files/runsvdir.in
@@ -14,13 +14,17 @@
. /etc/rc.subr
-name="runsvdir"
+name=runsvdir
rcvar=runsvdir_enable
-command="%%PREFIX%%/sbin/runsvdir"
+load_rc_config runsvdir
+
+: ${runsvdir_enable:=NO}
+: ${runsvdir_path=%%SERVICE_DIR%%}
+command="%%PREFIX%%/sbin/runsvdir"
start_cmd=runsvdir_start
-stop_postcmd=runsvdir_post_stop
+stop_postcmd="%%PREFIX%%/sbin/sv exit ${runsvdir_path}/*"
runsvdir_start()
{
@@ -31,14 +35,4 @@ runsvdir_start()
${command} ${runsvdir_path}
}
-runsvdir_post_stop()
-{
- %%PREFIX%%/sbin/sv exit ${runsvdir_path}/*
-}
-
-# read configuration and set defaults
-load_rc_config "$name"
-: ${runsvdir_enable="NO"}
-: ${runsvdir_path="%%SERVICE_DIR%%"}
-
-run_rc_command "$1"
+run_rc_command $1
diff --git a/sysutils/runit/pkg-descr b/sysutils/runit/pkg-descr
index d960ab51f843..8a3b54468a0c 100644
--- a/sysutils/runit/pkg-descr
+++ b/sysutils/runit/pkg-descr
@@ -8,4 +8,4 @@ runit is daemontools replacement:
It can optionally replace init(8) as process 1.
-WWW: http://smarden.org/runit/
+WWW: http://smarden.org/runit/
diff --git a/sysutils/runit/pkg-plist b/sysutils/runit/pkg-plist
index d1eb99aa1a6a..559efe70f95f 100644
--- a/sysutils/runit/pkg-plist
+++ b/sysutils/runit/pkg-plist
@@ -13,10 +13,19 @@
@exec [ ! -f %D/%%ETCDIR%%/ctrlaltdel ] && cp -p %D/%F %B/ctrlaltdel
@unexec cmp -s %D/%%ETCDIR%%/getty-ttyv4/run %D/%%ETCDIR%%/getty-ttyv4/run.sample && rm -f %D/%%ETCDIR%%/getty-ttyv4/run
%%ETCDIR%%/getty-ttyv4/run.sample
-@exec [ ! -f %D/%%ETCDIR%%/getty-ttyv4/run ] && cp -p %D/%F %B/getty-ttyv4/run
+@exec [ ! -f %D/%%ETCDIR%%/getty-ttyv4/run ] && cp -p %D/%F %B/run
@unexec cmp -s %D/%%ETCDIR%%/getty-ttyv4/finish %D/%%ETCDIR%%/getty-ttyv4/finish.sample && rm -f %D/%%ETCDIR%%/getty-ttyv4/finish
%%ETCDIR%%/getty-ttyv4/finish.sample
-@exec [ ! -f %D/%%ETCDIR%%/getty-ttyv4/finish ] && cp -p %D/%F %B/getty-ttyv4/finish
+@exec [ ! -f %D/%%ETCDIR%%/getty-ttyv4/finish ] && cp -p %D/%F %B/finish
+man/man8/chpst.8.gz
+man/man8/runit-init.8.gz
+man/man8/runit.8.gz
+man/man8/runsv.8.gz
+man/man8/runsvchdir.8.gz
+man/man8/runsvdir.8.gz
+man/man8/sv.8.gz
+man/man8/svlogd.8.gz
+man/man8/utmpset.8.gz
sbin/chpst
sbin/runit
sbin/runit-init