diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-04-05 13:57:58 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-04-05 13:57:58 +0000 |
commit | 7a6dc5d26b47ce2557a8b3b7484aa807de2a18be (patch) | |
tree | a8e4efadc8ffeb278496f8c6de276989c9821e64 /etc | |
parent | c2e8002900880aea456acd1677161cbc7663ee80 (diff) |
Handle a daemon_flags of '-n' by using printf '%s\n' instead of echo
ok otto@, aja@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/rc.subr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 4d972c4a46d..0110e0a9fb0 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.31 2011/04/05 11:47:32 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.32 2011/04/05 13:57:57 guenther Exp $ # Default functions and variables used by rc.d(8) scripts. @@ -116,6 +116,6 @@ getcap -f /etc/login.conf ${_name} 1>/dev/null 2>&1 && \ [ -n "${_rcflags}" ] && daemon_flags=${_rcflags} [ -n "${_rcuser}" ] && daemon_user=${_rcuser} -daemon_flags=$(echo "${daemon_flags}" | tr -s "[:space:]") +daemon_flags=$(printf '%s\n' "${daemon_flags}" | tr -s "[:space:]") pexp="${daemon}${daemon_flags:+ ${daemon_flags}}" rcexec="su -l -c ${daemon_class} -s /bin/sh ${daemon_user} -c" |