|
This modifies the inittab to run a very simple loop on d-i's ttyS0
that reads commands from stdin, runs them and tops and tails the
output with various control characters to make it easier to see
when we have a result.
It outputs a BEL (Ctrl-G, \a, \007) at the start, then an STX (\002)
before running the command, and an ETX (\003) afterwards, to bracket
STDOUT. After the ETX comes the command's return code, in decimal,
then a US (\037), then comes the STDERR, and finally a NUL (\000)
That lets us send an 'exit' and look for a BEL then issue
a command and find the values required to populate the @returncode,
@stdout and @stderr values.
|