diff options
Diffstat (limited to 'poky/meta/recipes-core/sysvinit')
-rw-r--r-- | poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty | 11 | ||||
-rw-r--r-- | poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 42 |
2 files changed, 13 insertions, 40 deletions
diff --git a/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty index f60409eae3..f5671ee53d 100644 --- a/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty +++ b/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty @@ -1,5 +1,9 @@ #!/bin/sh +SPEED=$1 +DEVICE=$2 +TERM=$3 + # busybox' getty does this itself, util-linux' agetty needs extra help getty="/sbin/getty" case $(readlink -f "${getty}") in @@ -13,9 +17,4 @@ case $(readlink -f "${getty}") in ;; esac -if [ -e /sys/class/tty/$2 -a -c /dev/$2 ]; then - ${setsid:-} ${getty} ${options:-} -L $1 $2 $3 -else - # Prevent respawning to fast error if /dev entry does not exist - sleep 1000 -fi +${setsid:-} ${getty} ${options:-} -L $SPEED $DEVICE $TERM diff --git a/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb index b1f9cb4caa..6bbe517df1 100644 --- a/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +++ b/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -21,14 +21,14 @@ do_install() { install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty - set -x - tmp="${SERIAL_CONSOLES}" - for i in $tmp + CONSOLES="${SERIAL_CONSOLES}" + for s in $CONSOLES do - j=`echo ${i} | sed s/\;/\ /g` - l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'` - label=`echo $l | sed 's/.*\(....\)/\1/'` - echo "$label:12345:respawn:${base_bindir}/start_getty ${j} vt102" >> ${D}${sysconfdir}/inittab + speed=$(echo $s | cut -d\; -f 1) + device=$(echo $s | cut -d\; -f 2) + label=$(echo $device | sed -e 's/tty//' | tail --bytes=5) + + echo "$label:12345:respawn:${sbindir}/ttyrun $device ${base_bindir}/start_getty $speed $device vt102" >> ${D}${sysconfdir}/inittab done if [ "${USE_VT}" = "1" ]; then @@ -52,33 +52,6 @@ EOF fi } -pkg_postinst:${PN} () { -# run this on host and on target -if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then - exit 0 -fi -} - -pkg_postinst_ontarget:${PN} () { -# run this on the target -if [ -e /proc/consoles ]; then - tmp="${SERIAL_CONSOLES_CHECK}" - for i in $tmp - do - j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g` - 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 -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab - fi - fi - done - kill -HUP 1 -else - exit 1 -fi -} - # USE_VT and SERIAL_CONSOLES are generally defined by the MACHINE .conf. # Set PACKAGE_ARCH appropriately. PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -89,4 +62,5 @@ CONFFILES:${PN} = "${sysconfdir}/inittab" USE_VT ?= "1" SYSVINIT_ENABLED_GETTYS ?= "1" +RDEPENDS:${PN} = "ttyrun" RCONFLICTS:${PN} = "busybox-inittab" |