From 8e30a3b2d0996668917876a48bb306f9e0a981ab Mon Sep 17 00:00:00 2001 From: ajacoutot <> Date: Wed, 15 Jul 2015 13:48:16 +0000 Subject: [PATCH] By default, require an exact match of the process name and argument list. This allows running several instances of the same rc.d(8) script by just linking it to different name. e.g. ln -s ftpproxy ftpproxy6 echo 'ftpproxy6_flags=-6' >>/etc/rc.conf.local This is likely to break some rc.d scripts in ports. I will try and fix them all in the next few days but I'd appreciate reports if I missed some. ok halex@ --- src/etc/rc.d/rc.subr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/etc/rc.d/rc.subr b/src/etc/rc.d/rc.subr index 9eef525c..9ccc3b8a 100644 --- a/src/etc/rc.d/rc.subr +++ b/src/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.98 2015/07/15 12:26:25 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.99 2015/07/15 13:48:16 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014 Antoine Jacoutot # Copyright (c) 2010, 2011 Ingo Schwarze @@ -157,15 +157,15 @@ rc_start() { } rc_check() { - pgrep -q -f "^${pexp}" + pgrep -q -xf "${pexp}" } rc_reload() { - pkill -HUP -f "^${pexp}" + pkill -HUP -xf "${pexp}" } rc_stop() { - pkill -f "^${pexp}" + pkill -xf "${pexp}" } rc_cmd() {