Commit 6852dc23 authored by nikstur's avatar nikstur
Browse files

nixos/rshim: fix shell escape

Using escapeShellArg does not make sense here because (a) it turned the
list into a string, so the entire service failed and (b) because systemd
does not use the same escaping mechanism as bash.
parent 6d6c7c59
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3,11 +3,11 @@
let
  cfg = config.services.rshim;

  rshimCommand = lib.escapeShellArgs ([ "${cfg.package}/bin/rshim" ]
  rshimCommand = [ "${cfg.package}/bin/rshim" ]
    ++ lib.optionals (cfg.backend != null) [ "--backend ${cfg.backend}" ]
    ++ lib.optionals (cfg.device != null) [ "--device ${cfg.device}" ]
    ++ lib.optionals (cfg.index != null) [ "--index ${builtins.toString cfg.index}" ]
    ++ [ "--log-level ${builtins.toString cfg.log-level}" ])
    ++ [ "--log-level ${builtins.toString cfg.log-level}" ]
  ;
in
{