Work around "Input/output error" opening /dev/ttyS0

E.g. http://hydra.nixos.org/build/5541847

This is a random occurence, maybe due to a race with something else.
So just retry until it works.
This commit is contained in:
Eelco Dolstra 2013-07-16 15:04:32 +02:00
parent 71a197bc6e
commit 90148d6fd1

View File

@ -22,7 +22,8 @@ let kernel = config.boot.kernelPackages.kernel; in
export DISPLAY=:0.0
source /etc/profile
cd /tmp
exec < /dev/hvc0 > /dev/hvc0 2> /dev/ttyS0
exec < /dev/hvc0 > /dev/hvc0
while ! exec 2> /dev/ttyS0; do sleep 0.1; done
echo "connecting to host..." >&2
stty -F /dev/hvc0 raw -echo # prevent nl -> cr/nl conversion
echo