diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2012-03-24 00:01:29 +0100 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2012-03-24 13:19:41 -0500 |
commit | 8104618d10bb4c06e87c723b3359cb9d5871fd51 (patch) | |
tree | 7b714ceed5038a426cba5fb64564f6f81ca6f8c7 | |
parent | eb11953dd2bd713e6494db6da85ca87ac7f475e6 (diff) |
init.d/sysctl.Linux: do not use sysctl -q
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ò <flameeyes@flameeyes.eu>
-rw-r--r-- | init.d/sysctl.Linux.in | 4 |
1 files changed, 2 insertions, 2 deletions
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 |