diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2017-07-25 07:46:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 07:46:05 +0100 |
commit | 97544a6c38ccccdb69f32af56b2c01bbf37a4d7b (patch) | |
tree | f62c0f45b12e415c5b85863c1d81d0f5c62bb3c1 /nixos | |
parent | fb9120d5e773ee3df0acd4d63726f4fe81243221 (diff) | |
parent | f2bfb459c412be96a145981b829882202d8f17d5 (diff) | |
download | nixlib-97544a6c38ccccdb69f32af56b2c01bbf37a4d7b.tar nixlib-97544a6c38ccccdb69f32af56b2c01bbf37a4d7b.tar.gz nixlib-97544a6c38ccccdb69f32af56b2c01bbf37a4d7b.tar.bz2 nixlib-97544a6c38ccccdb69f32af56b2c01bbf37a4d7b.tar.lz nixlib-97544a6c38ccccdb69f32af56b2c01bbf37a4d7b.tar.xz nixlib-97544a6c38ccccdb69f32af56b2c01bbf37a4d7b.tar.zst nixlib-97544a6c38ccccdb69f32af56b2c01bbf37a4d7b.zip |
Merge pull request #27627 from volth/zookeeper-escape-shell
nixos/zookeeper: escape cfg.extraCmdLineOptions
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/zookeeper.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/misc/zookeeper.nix b/nixos/modules/services/misc/zookeeper.nix index b7bca8b56b28..d85b5e4ec507 100644 --- a/nixos/modules/services/misc/zookeeper.nix +++ b/nixos/modules/services/misc/zookeeper.nix @@ -4,7 +4,7 @@ with lib; let cfg = config.services.zookeeper; - + zookeeperConfig = '' dataDir=${cfg.dataDir} clientPort=${toString cfg.port} @@ -49,7 +49,7 @@ in { default = 1; type = types.int; }; - + extraConf = mkOption { description = "Extra configuration for Zookeeper."; type = types.lines; @@ -119,7 +119,7 @@ in { ExecStart = '' ${pkgs.jre}/bin/java \ -cp "${pkgs.zookeeper}/lib/*:${pkgs.zookeeper}/${pkgs.zookeeper.name}.jar:${configDir}" \ - ${toString cfg.extraCmdLineOptions} \ + ${escapeShellArgs cfg.extraCmdLineOptions} \ -Dzookeeper.datadir.autocreate=false \ ${optionalString cfg.preferIPv4 "-Djava.net.preferIPv4Stack=true"} \ org.apache.zookeeper.server.quorum.QuorumPeerMain \ |