diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2015-07-15 13:48:17 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2015-07-15 13:48:17 +0000 |
commit | ff1df6f11db03853f6e4b77297aeaf53e6d2ad83 (patch) | |
tree | 2af6ea9057ff3a3a5c144ddadf8c0bc2532cd2ae /etc | |
parent | 1ee6d2163e1dcb9dbb506785b746e1944c1a19fa (diff) |
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@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/rc.subr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 9eef525cee1..9ccc3b8aa56 100644 --- a/etc/rc.d/rc.subr +++ b/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 <ajacoutot@openbsd.org> # Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -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() { |