From 01130e502a60665ffa2cc78888eec74811ff7c1b Mon Sep 17 00:00:00 2001 From: Evgeny Egorochkin Date: Thu, 31 Dec 2015 09:50:58 +0200 Subject: [PATCH] systemd: backslashes are no longer allowed in script names --- nixos/modules/system/boot/systemd.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 826368e711ad..0fc8491cdf8f 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -179,8 +179,9 @@ let ]; makeJobScript = name: text: - let x = pkgs.writeTextFile { name = "unit-script"; executable = true; destination = "/bin/${shellEscape name}"; inherit text; }; - in "${x}/bin/${shellEscape name}"; + let mkScriptName = s: (replaceChars [ "\\" ] [ "-" ] (shellEscape s) ); + x = pkgs.writeTextFile { name = "unit-script"; executable = true; destination = "/bin/${mkScriptName name}"; inherit text; }; + in "${x}/bin/${mkScriptName name}"; unitConfig = { name, config, ... }: { config = {