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:
parent
217566ede4
commit
70cb6e67c0
|
@ -39,7 +39,7 @@ let
|
||||||
|
|
||||||
shellCmdsForEventScript = eventname: commands: ''
|
shellCmdsForEventScript = eventname: commands: ''
|
||||||
echo "#!${pkgs.stdenv.shell}" > "$out/${eventname}"
|
echo "#!${pkgs.stdenv.shell}" > "$out/${eventname}"
|
||||||
echo "${commands}" >> "$out/${eventname}"
|
echo '${commands}' >> "$out/${eventname}"
|
||||||
chmod a+x "$out/${eventname}"
|
chmod a+x "$out/${eventname}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue