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>
This commit is contained in:
parent
eb11953dd2
commit
8104618d10
@ -18,9 +18,9 @@ start()
|
|||||||
for conf in /etc/sysctl.d/*.conf /etc/sysctl.conf; do
|
for conf in /etc/sysctl.d/*.conf /etc/sysctl.conf; do
|
||||||
if [ -r "$conf" ]; then
|
if [ -r "$conf" ]; then
|
||||||
vebegin "applying $conf"
|
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}"
|
errs="${errs} ${err}"
|
||||||
sysctl -q -e -p "${conf}"
|
sysctl -e -p "${conf}" >/dev/null
|
||||||
fi
|
fi
|
||||||
veend $? || retval=1
|
veend $? || retval=1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user