mirror of
git://git.yoctoproject.org/poky
synced 2026-09-29 21:15:44 +00:00
Wrap calls to start_getty with ttyrun, so that getty isn't started if the device doesn't exist. As we know start_getty is only called when the device exists we can remove the partial workaround for this problem in that scripts too. This neatly obsoletes SERIAL_CONSOLES_CHECK, whose sole purpose was to check what terminals are present at boot and rewrite inittab. Notably, this meant that SERIAL_CONSOLES_CHECK made using a read-only rootfs impossible. (From OE-Core rev: f4fd17d5a5e4eaa31995d3ca52c871cfbdc0df68) (From OE-Core rev: 8e48297621311116d3edd7e3aa0de1b8ef2431b1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
21 lines
383 B
Bash
21 lines
383 B
Bash
#!/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
|
|
*/busybox*)
|
|
;;
|
|
*)
|
|
if [ -x "/usr/bin/setsid" ] ; then
|
|
setsid="/usr/bin/setsid"
|
|
fi
|
|
options=""
|
|
;;
|
|
esac
|
|
|
|
${setsid:-} ${getty} ${options:-} -L $SPEED $DEVICE $TERM
|