From 8104618d10bb4c06e87c723b3359cb9d5871fd51 Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Sat, 24 Mar 2012 00:01:29 +0100 Subject: init.d/sysctl.Linux: do not use sysctl -q MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The -q option is not implemented by BusyBox, so instead of using that, make it so that the standard error is caught, but standard output is thrown away. Note: the ordered behaviour of redirection is part of POSIX so we should be on the safe side with this change, as first we duplicate the output descriptor to be used as stderr, then we change the output descriptor to point to NULL. Signed-off-by: Diego Elio Pettenò --- init.d/sysctl.Linux.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init.d/sysctl.Linux.in') diff --git a/init.d/sysctl.Linux.in b/init.d/sysctl.Linux.in index 0584c628..00b4c334 100644 --- a/init.d/sysctl.Linux.in +++ b/init.d/sysctl.Linux.in @@ -18,9 +18,9 @@ start() for conf in /etc/sysctl.d/*.conf /etc/sysctl.conf; do if [ -r "$conf" ]; then vebegin "applying $conf" - if ! err=$(sysctl -q -p "$conf" 2>&1) ; then + if ! err=$(sysctl -p "$conf" 2>&1 >/dev/null) ; then errs="${errs} ${err}" - sysctl -q -e -p "${conf}" + sysctl -e -p "${conf}" >/dev/null fi veend $? || retval=1 fi -- cgit v1.2.3