1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

nixos/service-runner: fix evaluation

Follow-up to: nixos/systemd: allow preStart with other ExecStartPre cmdlines #109976

As the additional ExecStartPre and ExecStartPost are now lists, update
their processing by service-runner.nix
This commit is contained in:
Michael Raskin 2021-02-05 12:57:32 +01:00
parent 24e5fe6075
commit 9486375887

View file

@ -52,7 +52,7 @@ let
# Run the ExecStartPre program. FIXME: this could be a list.
my $preStart = <<END_CMD;
${service.serviceConfig.ExecStartPre or ""}
${concatStringsSep "\n" (service.serviceConfig.ExecStartPre or [])}
END_CMD
if (defined $preStart && $preStart ne "\n") {
print STDERR "running ExecStartPre: $preStart\n";
@ -79,7 +79,7 @@ let
# Run the ExecStartPost program.
my $postStart = <<END_CMD;
${service.serviceConfig.ExecStartPost or ""}
${concatStringsSep "\n" (service.serviceConfig.ExecStartPost or [])}
END_CMD
if (defined $postStart && $postStart ne "\n") {
print STDERR "running ExecStartPost: $postStart\n";