Multiple consoles

For systems that have multiple consoles or multiple serial ports, you may wish to have the shell running on each of them. Here's an example showing you how that's done:

[+script] .script = {
    # start any other drivers you need here
    devc-con -e -n4 &
    reopen /dev/con1
    [+session] esh &
    reopen /dev/con2
    [+session] esh &

As you can see, the trick is to:

  1. Start the console driver with the -n option to ask for more than one console (in this case, we asked for four virtual consoles).
  2. Redirect standard input, output, and error to each of the consoles in turn.
  3. Start the shell on each console.

It's important to run the shell in the background (via the ampersand character "&") — if you don't, then the interpretation of the script will suspend until the shell exits!