diff --git a/doc/tutorial.rst b/doc/tutorial.rst index ade81f8..2422bb8 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -69,10 +69,11 @@ device's serial console and the `QEMU monitor stdin/stdout. You should now see Linux boot messages and after a few seconds be -presented with a login prompt. You can login on the console as -``root`` (password is "secret") and poke around to see what processes are -running. To kill the emulator, press ^P (Control P) then c to enter the -"QEMU Monitor", then type ``quit`` at the ``(qemu)`` prompt. +presented with a root shell prompt. You can run commands to look at +the filesystem, see what processes are running, view log messages (in +:file:/run/uncaught-logs.current), etc. To kill the emulator, press ^P +(Control P) then c to enter the "QEMU Monitor", then type ``quit`` at +the ``(qemu)`` prompt. To see that it's running network services we need to connect to its emulated network. Start the machine again, if you had stopped it, and diff --git a/examples/hello-from-mt300.nix b/examples/hello-from-mt300.nix index 56bc0ea..2c1c2f2 100644 --- a/examples/hello-from-mt300.nix +++ b/examples/hello-from-mt300.nix @@ -8,7 +8,7 @@ in rec { ../modules/network ../modules/ssh ../modules/vlan - ../modules/flashimage.nix + ../modules/outputs/flashimage.nix ]; boot.tftp = { diff --git a/modules/s6/default.nix b/modules/s6/default.nix index 46d88d0..249b391 100644 --- a/modules/s6/default.nix +++ b/modules/s6/default.nix @@ -80,10 +80,17 @@ let run = { file = '' #!${execline}/bin/execlineb -P - /bin/getty -l /bin/login 115200 /dev/console + ${execline}/bin/redirfd -w 2 /dev/console + ${execline}/bin/fdmove -c 1 2 + ${execline}/bin/redirfd -r 0 /dev/console + ${execline}/bin/cd / + /bin/ash -l ''; mode = "0755"; }; + down-signal = { + file = "HUP\n"; + }; }; ".s6-svscan" = let diff --git a/tests/ext4/script.expect b/tests/ext4/script.expect index 4d78c5e..3d64c8d 100644 --- a/tests/ext4/script.expect +++ b/tests/ext4/script.expect @@ -2,7 +2,6 @@ set timeout 10 spawn socat unix-connect:vm/console - send "\r\n" -expect "login:" { send "root\r\n" } expect "#" send "echo HELLO WORLD > /hello\r\n" expect "#" diff --git a/tests/jffs2/script.expect b/tests/jffs2/script.expect index 4d78c5e..3d64c8d 100644 --- a/tests/jffs2/script.expect +++ b/tests/jffs2/script.expect @@ -2,7 +2,6 @@ set timeout 10 spawn socat unix-connect:vm/console - send "\r\n" -expect "login:" { send "root\r\n" } expect "#" send "echo HELLO WORLD > /hello\r\n" expect "#" diff --git a/tests/min-copy-closure/wait-until-ready.expect b/tests/min-copy-closure/wait-until-ready.expect index 185574d..7fb9a66 100644 --- a/tests/min-copy-closure/wait-until-ready.expect +++ b/tests/min-copy-closure/wait-until-ready.expect @@ -2,4 +2,3 @@ set timeout 60 spawn socat unix-connect:vm/console - send "\r\n" -expect "login:" \ No newline at end of file diff --git a/tests/pppoe/getaddress.expect b/tests/pppoe/getaddress.expect index 3f0fc4c..a943cca 100644 --- a/tests/pppoe/getaddress.expect +++ b/tests/pppoe/getaddress.expect @@ -2,7 +2,6 @@ set timeout 60 spawn socat unix-connect:vm/console - send "\r\n" -expect "login:" { send "root\r\n" } expect "#" set FINISHED 0 set EXIT "1" diff --git a/tests/wlan/wait-for-wlan.expect b/tests/wlan/wait-for-wlan.expect index 0bfd584..070d765 100644 --- a/tests/wlan/wait-for-wlan.expect +++ b/tests/wlan/wait-for-wlan.expect @@ -2,7 +2,6 @@ set timeout 60 spawn socat unix-connect:vm/console - send "\r\n" -expect "login:" { send "root\r\n" } expect "#" set FINISHED 0 set EXIT "1"