diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2015-03-01 21:29:40 +0100 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2015-06-01 22:14:03 +0200 |
commit | 70cb6e67c0a976f3e170e38b6b33777685f7c680 (patch) | |
tree | 306bbce110ea558ec6c25e2110f5b5579f1e6738 /nixos | |
parent | 217566ede466f8189f4c0f91784ac3143f9990c2 (diff) | |
download | nixpkgs-70cb6e67c0a976f3e170e38b6b33777685f7c680.tar nixpkgs-70cb6e67c0a976f3e170e38b6b33777685f7c680.tar.gz nixpkgs-70cb6e67c0a976f3e170e38b6b33777685f7c680.tar.bz2 nixpkgs-70cb6e67c0a976f3e170e38b6b33777685f7c680.tar.lz nixpkgs-70cb6e67c0a976f3e170e38b6b33777685f7c680.tar.xz nixpkgs-70cb6e67c0a976f3e170e38b6b33777685f7c680.tar.zst nixpkgs-70cb6e67c0a976f3e170e38b6b33777685f7c680.zip |
nixos/apcupsd: don't evaluate event hooks at build time
Better replace the double quotes in 'echo "${commands}"' with single quotes, to prevent the shell from doing command substitution etc. at configuration build time.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/apcupsd.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/apcupsd.nix b/nixos/modules/services/monitoring/apcupsd.nix index ffa7be7dd30..6cd0254dbe3 100644 --- a/nixos/modules/services/monitoring/apcupsd.nix +++ b/nixos/modules/services/monitoring/apcupsd.nix @@ -39,7 +39,7 @@ let shellCmdsForEventScript = eventname: commands: '' echo "#!${pkgs.stdenv.shell}" > "$out/${eventname}" - echo "${commands}" >> "$out/${eventname}" + echo '${commands}' >> "$out/${eventname}" chmod a+x "$out/${eventname}" ''; |