mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 17:53:37 +00:00
4a219c8aeb
The way we build the package results in the binaries being hardcoded to look for $out/etc/ups.conf instead of /etc/nut/ups.conf (where the module places the file). This results in `upsdrvctl` failing to dispatch shutdown commands (since it cannot find the configuration) and prevents a primary monitor from cutting power to the appropriate UPS. Note that we cannot use `--sysconfdir=/etc/nut` as a configure flag since that results in the install phase trying to install directly into /etc/nut which predictably fails in the sandbox.
11 lines
361 B
Diff
11 lines
361 B
Diff
diff --git a/scripts/systemd/nutshutdown.in b/scripts/systemd/nutshutdown.in
|
|
index ace2485b3..9dee869bb 100755
|
|
--- a/scripts/systemd/nutshutdown.in
|
|
+++ b/scripts/systemd/nutshutdown.in
|
|
@@ -1,4 +1,5 @@
|
|
#!/bin/sh
|
|
+export NUT_CONFPATH="${NUT_CONFPATH-/etc/nut}"
|
|
|
|
# This script requires both nut-server (drivers)
|
|
# and nut-client (upsmon) to be present locally
|