sysvinit-inittab: fix getty device removal

getty devices were not being removed in some cases because device name
was not at the end of the line, for example a ttyS1 device:

S1:12345:respawn:/bin/start_getty 115200 ttyS1 vt102

Removing this limitation allows sed to remove any line containing
the device.

(From OE-Core rev: 2e0b36981c1f91ed0d3d457c370df10a099407af)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Leonardo Sandoval 2016-11-29 15:56:52 -06:00 committed by Richard Purdie
parent 7db7950367
commit 2f0eb8e1b6
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
k=`echo ${i} | sed s/^.*\://g`
if [ -z "`grep ${j} /proc/consoles`" ]; then
if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then
sed -i /^.*${j}$/d /etc/inittab
sed -i -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab
fi
fi
done