summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab/start_getty11
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb30
2 files changed, 7 insertions, 34 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
index f60409eae3..f5671ee53d 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
@@ -1,5 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2
3SPEED=$1
4DEVICE=$2
5TERM=$3
6
3# busybox' getty does this itself, util-linux' agetty needs extra help 7# busybox' getty does this itself, util-linux' agetty needs extra help
4getty="/sbin/getty" 8getty="/sbin/getty"
5case $(readlink -f "${getty}") in 9case $(readlink -f "${getty}") in
@@ -13,9 +17,4 @@ case $(readlink -f "${getty}") in
13 ;; 17 ;;
14esac 18esac
15 19
16if [ -e /sys/class/tty/$2 -a -c /dev/$2 ]; then 20${setsid:-} ${getty} ${options:-} -L $SPEED $DEVICE $TERM
17 ${setsid:-} ${getty} ${options:-} -L $1 $2 $3
18else
19 # Prevent respawning to fast error if /dev entry does not exist
20 sleep 1000
21fi
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index e70dc705c0..6bbe517df1 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -28,7 +28,7 @@ do_install() {
28 device=$(echo $s | cut -d\; -f 2) 28 device=$(echo $s | cut -d\; -f 2)
29 label=$(echo $device | sed -e 's/tty//' | tail --bytes=5) 29 label=$(echo $device | sed -e 's/tty//' | tail --bytes=5)
30 30
31 echo "$label:12345:respawn:${base_bindir}/start_getty $speed $device vt102" >> ${D}${sysconfdir}/inittab 31 echo "$label:12345:respawn:${sbindir}/ttyrun $device ${base_bindir}/start_getty $speed $device vt102" >> ${D}${sysconfdir}/inittab
32 done 32 done
33 33
34 if [ "${USE_VT}" = "1" ]; then 34 if [ "${USE_VT}" = "1" ]; then
@@ -52,33 +52,6 @@ EOF
52 fi 52 fi
53} 53}
54 54
55pkg_postinst:${PN} () {
56# run this on host and on target
57if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
58 exit 0
59fi
60}
61
62pkg_postinst_ontarget:${PN} () {
63# run this on the target
64if [ -e /proc/consoles ]; then
65 tmp="${SERIAL_CONSOLES_CHECK}"
66 for i in $tmp
67 do
68 j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g`
69 k=`echo ${i} | sed s/^.*\://g`
70 if [ -z "`grep ${j} /proc/consoles`" ]; then
71 if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then
72 sed -i -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab
73 fi
74 fi
75 done
76 kill -HUP 1
77else
78 exit 1
79fi
80}
81
82# USE_VT and SERIAL_CONSOLES are generally defined by the MACHINE .conf. 55# USE_VT and SERIAL_CONSOLES are generally defined by the MACHINE .conf.
83# Set PACKAGE_ARCH appropriately. 56# Set PACKAGE_ARCH appropriately.
84PACKAGE_ARCH = "${MACHINE_ARCH}" 57PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -89,4 +62,5 @@ CONFFILES:${PN} = "${sysconfdir}/inittab"
89USE_VT ?= "1" 62USE_VT ?= "1"
90SYSVINIT_ENABLED_GETTYS ?= "1" 63SYSVINIT_ENABLED_GETTYS ?= "1"
91 64
65RDEPENDS:${PN} = "ttyrun"
92RCONFLICTS:${PN} = "busybox-inittab" 66RCONFLICTS:${PN} = "busybox-inittab"