From b02a8456c13f201440d5714078b3007e4c4d4a74 Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Fri, 31 Oct 2014 09:07:49 +0000 Subject: Make default output matches status. Hackish but we are not allowed to use svc_default_enabled_flags like any other function... --- usr.sbin/rcctl/rcctl.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh index f51c237ae13..378c61832f5 100644 --- a/usr.sbin/rcctl/rcctl.sh +++ b/usr.sbin/rcctl/rcctl.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: rcctl.sh,v 1.47 2014/10/31 09:04:08 ajacoutot Exp $ +# $OpenBSD: rcctl.sh,v 1.48 2014/10/31 09:07:48 ajacoutot Exp $ # # Copyright (c) 2014 Antoine Jacoutot # Copyright (c) 2014 Ingo Schwarze @@ -100,7 +100,9 @@ svc_get_defaults() local _i _svc=$1 if [ -n "${_svc}" ]; then - print -r -- "$(svc_default_enabled_flags ${_svc})" + # XXX would be much simpler to just do that: + #svc_default_enabled_flags ${_svc} + print -r -- "$(svc_default_enabled_flags ${_svc})" | sed '/^$/d' svc_default_enabled ${_svc} else for _i in $(ls_rcscripts); do -- cgit v1.2.3