diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2014-10-10 15:42:31 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2014-10-10 15:42:31 +0000 |
commit | f4057bee4f99a0c2093fe33b17767834595acd83 (patch) | |
tree | a2938f0accfa3ec43de09881e448809b5748bd36 /usr.sbin/rcctl | |
parent | 05ce8185fb4670d7423bdccf6082917c196b7f84 (diff) |
Use printf(1) to prevent '-e' in daemon_flags from being fed as an
argument to the built-in echo.
Diffstat (limited to 'usr.sbin/rcctl')
-rw-r--r-- | usr.sbin/rcctl/rcctl.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh index df18c1dbaea..973fbb7f6d0 100644 --- a/usr.sbin/rcctl/rcctl.sh +++ b/usr.sbin/rcctl/rcctl.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: rcctl.sh,v 1.39 2014/10/10 07:27:44 ajacoutot Exp $ +# $OpenBSD: rcctl.sh,v 1.40 2014/10/10 15:42:30 ajacoutot Exp $ # # Copyright (c) 2014 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -79,7 +79,7 @@ svc_default_enabled_flags() FUNCS_ONLY=1 rc_cmd() { } . /etc/rc.d/${_svc} >/dev/null 2>&1 - [ -n "${daemon_flags}" ] && echo ${daemon_flags} + [ -n "${daemon_flags}" ] && printf "%s\n" ${daemon_flags} } svc_get_flags() @@ -102,7 +102,7 @@ svc_get_flags() [ -z "${daemon_flags}" ] && \ daemon_flags="$(svc_default_enabled_flags ${_svc})" - echo ${daemon_flags} | sed '/^$/d' + printf "%s\n" ${daemon_flags} | sed '/^$/d' fi } |