[oe-commits] [openembedded-core] 12/28: sysvinit-inittab: fix getty device removal

git at git.openembedded.org git at git.openembedded.org
Fri Dec 16 08:41:04 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 2e0b36981c1f91ed0d3d457c370df10a099407af
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
AuthorDate: Tue Nov 29 15:56:52 2016 -0600

    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.
    
    Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index c219cbf..5b9c422 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list