]> code.ossystems Code Review - openembedded-core.git/commitdiff
sysvinit-inittab: avoid pipe with grep
authorMatthieu Crapet <Matthieu.Crapet@ingenico.com>
Tue, 6 May 2014 12:17:51 +0000 (14:17 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 May 2014 11:56:41 +0000 (12:56 +0100)
Replace:
cat <file> | grep xxx
By:
grep xxx <file>

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb

index 30641dac88f7e18838a04616a430a04a9fd7bb52..c3244b46021e06be6d9860996e6e764b3b026d5e 100644 (file)
@@ -54,7 +54,7 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
        for i in $tmp
        do
                j=`echo ${i} | sed s/^.*\;//g`
-               if [ -z "`cat /proc/consoles | grep ${j}`" ]; then
+               if [ -z "`grep ${j} /proc/consoles`" ]; then
                        sed -i /^.*${j}$/d /etc/inittab
                fi
        done