]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: bootmisc.sh: Make sysctl -p honor VERBOSE
authorRichard Tollerton <rich.tollerton@ni.com>
Thu, 17 Jul 2014 21:56:52 +0000 (16:56 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Jul 2014 23:08:47 +0000 (00:08 +0100)
busybox sysctl may lack the "-q" setting, so simulate it with redirects.

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>
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh

index 3b5a47fcddad919b036eb1f591b9bcc733b870fd..5211824adec85cc959b2e3f9484724d581cf2801 100755 (executable)
@@ -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