systemd: backslashes are no longer allowed in script names

This commit is contained in:
Evgeny Egorochkin 2015-12-31 09:50:58 +02:00
parent c6340022ba
commit 01130e502a

View file

@ -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 = {