#!/bin/sh
# The display's text console on the USB serial line (ttyGS0), both ways:
# consmirror(8) draws tty1 there and types what comes back into it through a
# virtual keyboard (uinput) -- so the serial line shows what the display
# shows, and a login there is the login on the display.  Instead of a getty
# of its own on ttyGS0 (agetty-ttyGS0, kept in /etc/sv but not enabled),
# and without console=ttyGS0 on the kernel's command line: the kernel's
# messages are on the display, so they are in the mirror.
modprobe -q uinput
[ -c /dev/ttyGS0 ] || { sleep 2; exit 1; }
exec /usr/bin/consmirror /dev/ttyGS0
