From 662cbab60fab06bca1e01da5b5e334ca99ff650c Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Sat, 30 Aug 2014 20:37:46 +0000 Subject: When a service is not available, return ENOENT. Previous to this commit it was not possible to know whether a service existed without parsing the output of 'rcctl status' which is very expensive. req. by armani@ ok robert@ schwarze@ --- usr.sbin/rcctl/rcctl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh index 76bb1613c91..792b3c1503a 100644 --- a/usr.sbin/rcctl/rcctl.sh +++ b/usr.sbin/rcctl/rcctl.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: rcctl.sh,v 1.34 2014/08/29 21:04:37 schwarze Exp $ +# $OpenBSD: rcctl.sh,v 1.35 2014/08/30 20:37:46 ajacoutot Exp $ # # Copyright (c) 2014 Antoine Jacoutot # @@ -267,7 +267,7 @@ flags=$* if [ -n "$svc" ]; then if ! svc_is_avail $svc; then - _rc_err "${0##*/}: service $svc does not exist" + _rc_err "${0##*/}: service $svc does not exist" 2 fi elif [ "$action" != "status" ]; then usage -- cgit v1.2.3-59-g8ed1b