monitoring-plugins: fix path to ping in check_ping

The path to ping was configured to use the wrapper prior to its
removal [1]. This change removed the absolute path to ping/ping6 and
added them to the binPath. Only the perl scripts use binPath, and now
the C program `check_ping` fails to find the ping command.

[1] See 759ec1113d
This commit is contained in:
Andrew Childs 2023-11-25 11:32:12 +09:00
parent d805cfa16f
commit 4c87c27f5a

View File

@ -34,7 +34,6 @@ let
lm_sensors
net-snmp
procps
unixtools.ping
];
mailq = runCommand "mailq-wrapper" { preferLocalBuild = true; } ''
@ -76,8 +75,8 @@ stdenv.mkDerivation rec {
-e 's|^DEFAULT_PATH=.*|DEFAULT_PATH=\"${binPath}\"|'
configureFlagsArray+=(
--with-ping-command='ping -4 -n -U -w %d -c %d %s'
--with-ping6-command='ping -6 -n -U -w %d -c %d %s'
--with-ping-command='${lib.getBin unixtools.ping}/bin/ping -4 -n -U -w %d -c %d %s'
--with-ping6-command='${lib.getBin unixtools.ping}/bin/ping -6 -n -U -w %d -c %d %s'
)
install -Dm555 ${share} $out/share