sysvinit-inittab: avoid pipe with grep

Replace:
cat <file> | grep xxx
By:
grep xxx <file>

(From OE-Core rev: 350c7c63c05a977158da91b4e06f84a6fb84a6ee)

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Matthieu Crapet
2014-05-06 14:17:51 +02:00
committed by Richard Purdie
parent 44ba0766d5
commit 1150ef1879

View 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