mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
testing-instrumentation: Factor backdoor service out to variable
This commit is contained in:
parent
cfbb29d769
commit
f8ba8be54b
1 changed files with 39 additions and 36 deletions
|
@ -7,14 +7,9 @@ with lib;
|
|||
|
||||
let
|
||||
qemu-common = import ../../lib/qemu-common.nix { inherit lib pkgs; };
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
config = {
|
||||
|
||||
systemd.services.backdoor =
|
||||
{ wantedBy = [ "multi-user.target" ];
|
||||
backdoorService = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "dev-hvc0.device" "dev-${qemu-common.qemuSerialDevice}.device" ];
|
||||
after = [ "dev-hvc0.device" "dev-${qemu-common.qemuSerialDevice}.device" ];
|
||||
script =
|
||||
|
@ -50,6 +45,14 @@ in
|
|||
serviceConfig.KillSignal = "SIGHUP";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
config = {
|
||||
|
||||
systemd.services.backdoor = backdoorService
|
||||
|
||||
# Prevent agetty from being instantiated on the serial device, since it
|
||||
# interferes with the backdoor (writes to it will randomly fail
|
||||
# with EIO). Likewise for hvc0.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue