bootvine restored systemd's status output as soon as a display manager took the console. greetd's Type=idle only waits five seconds, so jobs still running then wrote status lines over the login screen. Restore the output when StartupFinished arrives instead, through a single private path that owns the console watch. A quit key or stopping the service still restores it at once, so a stuck boot stays visible.
38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
{ machine, ... }:
|
|
{
|
|
name = "bootvine-slow-services";
|
|
|
|
nodes.machine =
|
|
{ lib, ... }:
|
|
let
|
|
waitFor = flag: "/bin/sh -c 'until [ -e /run/${flag} ]; do sleep 0.1; done'";
|
|
in
|
|
{
|
|
imports = [
|
|
machine
|
|
../shared/recorded-display.nix
|
|
];
|
|
testing.initrdBackdoor = true;
|
|
boot.kernelParams = lib.mkAfter [ "console=tty0" ];
|
|
boot.initrd.systemd.services.initrd-hardware-probe.serviceConfig.ExecStart = lib.mkForce (
|
|
waitFor "release-initrd-hardware-probe"
|
|
);
|
|
systemd = {
|
|
settings.Manager.ShowStatus = lib.mkForce true;
|
|
services.sample-database.serviceConfig.ExecStop = lib.mkForce (waitFor "release-sample-database");
|
|
services.backdoor.before = [ "sample-database.service" ];
|
|
services.late-sensor-probe = {
|
|
wantedBy = [ "graphical.target" ];
|
|
after = [ "greetd.service" ];
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
ExecStart = waitFor "release-late-sensor-probe";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = builtins.readFile ../shared/console.py
|
|
+ builtins.readFile ../shared/screen_recording.py + builtins.readFile ./check.py;
|
|
}
|