diff options
author | Evgeny Egorochkin <phreedom@yandex.ru> | 2015-12-31 09:50:58 +0200 |
---|---|---|
committer | Evgeny Egorochkin <phreedom@yandex.ru> | 2016-01-10 11:31:38 +0200 |
commit | 01130e502a60665ffa2cc78888eec74811ff7c1b (patch) | |
tree | f8d652a93773a7be9cc686404bb555f359624c49 /nixos | |
parent | c6340022ba1c2d47a1d32b15265346a17153c6fd (diff) | |
download | nixpkgs-01130e502a60665ffa2cc78888eec74811ff7c1b.tar nixpkgs-01130e502a60665ffa2cc78888eec74811ff7c1b.tar.gz nixpkgs-01130e502a60665ffa2cc78888eec74811ff7c1b.tar.bz2 nixpkgs-01130e502a60665ffa2cc78888eec74811ff7c1b.tar.lz nixpkgs-01130e502a60665ffa2cc78888eec74811ff7c1b.tar.xz nixpkgs-01130e502a60665ffa2cc78888eec74811ff7c1b.tar.zst nixpkgs-01130e502a60665ffa2cc78888eec74811ff7c1b.zip |
systemd: backslashes are no longer allowed in script names
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 826368e711a..0fc8491cdf8 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 = { |