summaryrefslogtreecommitdiff
path: root/usr.sbin/rcctl/rcctl.sh
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2014-10-10 15:42:31 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2014-10-10 15:42:31 +0000
commitf4057bee4f99a0c2093fe33b17767834595acd83 (patch)
treea2938f0accfa3ec43de09881e448809b5748bd36 /usr.sbin/rcctl/rcctl.sh
parent05ce8185fb4670d7423bdccf6082917c196b7f84 (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/rcctl.sh')
-rw-r--r--usr.sbin/rcctl/rcctl.sh6
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
}