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.
This commit is contained in:
Bjørn Forsman 2015-03-01 21:29:40 +01:00
parent 217566ede4
commit 70cb6e67c0

View File

@ -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}"
'';