pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/daemontools-run There might be more than one ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/938ead857534
branches: trunk
changeset: 366156:938ead857534
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Fri Aug 04 18:44:15 2017 +0000
description:
There might be more than one svscan(8) on a system: for instance, non-
root users might run their own svscans. We want to signal only the
svscan process responsible for this service. Use argv0(1) to set
procname to "nbsvscan".
Bump version.
diffstat:
sysutils/daemontools-run/Makefile | 4 ++--
sysutils/daemontools-run/files/svscan.sh | 10 ++++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diffs (47 lines):
diff -r 755b669d8f81 -r 938ead857534 sysutils/daemontools-run/Makefile
--- a/sysutils/daemontools-run/Makefile Fri Aug 04 18:43:18 2017 +0000
+++ b/sysutils/daemontools-run/Makefile Fri Aug 04 18:44:15 2017 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2017/07/30 05:45:22 schmonz Exp $
+# $NetBSD: Makefile,v 1.4 2017/08/04 18:44:15 schmonz Exp $
#
-DISTNAME= daemontools-run-20170730
+DISTNAME= daemontools-run-20170804
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff -r 755b669d8f81 -r 938ead857534 sysutils/daemontools-run/files/svscan.sh
--- a/sysutils/daemontools-run/files/svscan.sh Fri Aug 04 18:43:18 2017 +0000
+++ b/sysutils/daemontools-run/files/svscan.sh Fri Aug 04 18:44:15 2017 +0000
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: svscan.sh,v 1.2 2017/07/30 05:45:22 schmonz Exp $
+# $NetBSD: svscan.sh,v 1.3 2017/08/04 18:44:15 schmonz Exp $
#
# @PKGNAME@ script to control svscan (service supervisor).
#
@@ -26,6 +26,7 @@
rcvar=${name}
required_dirs="${svscan_servicedir}"
command="@PREFIX@/bin/${name}"
+procname=nb${name}
start_precmd="svscan_precmd"
svscan_precmd()
@@ -33,8 +34,13 @@
if [ -f /etc/rc.subr ] && ! checkyesno svscan_log; then
svscan_logcmd=${svscan_nologcmd}
fi
+ # There might be more than one svscan(8) on a system: for instance,
+ # non-root users might run their own svscans. We want to signal only
+ # the svscan process responsible for this service. Use argv0(1) to
+ # set procname to "nbsvscan".
command="@PREFIX@/bin/pgrphack @SETENV@ - ${svscan_postenv}
-@PREFIX@/bin/${name} ${svscan_servicedir}
+@PREFIX@/bin/argv0 @PREFIX@/bin/${name} ${procname}
+${svscan_servicedir}
2>&1 |
@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @DAEMONTOOLS_LOG_USER@ ${svscan_logcmd}"
command_args="&"
Home |
Main Index |
Thread Index |
Old Index