initscripts: bootmisc.sh: Make sysctl -p honor VERBOSE

busybox sysctl may lack the "-q" setting, so simulate it with redirects.

(From OE-Core rev: 5672b5188557b940340bdc3e6a3ac30835b829fb)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Tollerton 2014-07-17 16:56:52 -05:00 committed by Richard Purdie
parent 779f845469
commit b573ae8011
1 changed files with 6 additions and 1 deletions

View File

@ -36,7 +36,12 @@ if [ -f "${SYSCTL_CONF}" ]
then
if [ -x "/sbin/sysctl" ]
then
/sbin/sysctl -p "${SYSCTL_CONF}"
# busybox sysctl does not support -q
VERBOSE_REDIR="1>/dev/null"
if [ "${VERBOSE}" != "no" ]; then
VERBOSE_REDIR="1>&1"
fi
eval /sbin/sysctl -p "${SYSCTL_CONF}" $VERBOSE_REDIR
else
echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
fi