summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajacoutot <ajacoutot@openbsd.org>2011-03-09 19:37:16 +0000
committerajacoutot <ajacoutot@openbsd.org>2011-03-09 19:37:16 +0000
commitcc56682ff27852e58a59fff0cf7ad52b1d40663b (patch)
treeb992b8be20cd28e1f97acad407e1b987ed3ae5d3
parentMove the redirections into the rc_cmd itself instead of rc_start and (diff)
downloadwireguard-openbsd-cc56682ff27852e58a59fff0cf7ad52b1d40663b.tar.xz
wireguard-openbsd-cc56682ff27852e58a59fff0cf7ad52b1d40663b.zip
Make reload and check consistent with start/stop.
ok robert@
-rw-r--r--etc/rc.d/rc.subr8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr
index e179fa9afca..0cc7dfa5807 100644
--- a/etc/rc.d/rc.subr
+++ b/etc/rc.d/rc.subr
@@ -1,4 +1,4 @@
-# $OpenBSD: rc.subr,v 1.23 2011/03/09 18:50:46 ajacoutot Exp $
+# $OpenBSD: rc.subr,v 1.24 2011/03/09 19:37:16 ajacoutot Exp $
rc_err() {
echo $1
@@ -10,7 +10,7 @@ rc_start() {
}
rc_check() {
- pgrep -f "^${pexp}" >/dev/null
+ pgrep -f "^${pexp}"
}
rc_reload() {
@@ -32,7 +32,7 @@ rc_cmd() {
case "$1" in
check)
- rc_check
+ rc_check >/dev/null
;;
start)
if ! rc_check; then
@@ -51,7 +51,7 @@ rc_cmd() {
type rc_post >/dev/null && rc_post || return 0
;;
reload)
- rc_check && rc_reload
+ (rc_check && rc_reload) >/dev/null
;;
restart)
/etc/rc.d/${_name} stop && /etc/rc.d/${_name} start