Skip to content

Commit

Permalink
sysvinit-inittab/start_getty: Fix respawn too fast
Browse files Browse the repository at this point in the history
When an entry in /dev does not exist, start_getty is returning directly.
As it is started from init in a respawn mode, it will loop infinitely.
In this case add a sleep inside start_getty to prevent the "Respawning
too fast" message popping up every 5 minutes.

This case is happening quite often when the system is started as an
hypervisor guest as the standard serial line is usually taken by it and
removed from the configuration.

This was triggered quite often running linux as dom0 on top of Xen on
arm as the serial line is taken by Xen and removed from the device tree.

Use the opportunity to replace one tab with spaces as the rest of the
file is using spaces.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
bertrand-marquis authored and rpurdie committed Aug 21, 2022
1 parent 9f2dbfc commit 5a704d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ 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

0 comments on commit 5a704d0

Please sign in to comment.