From 4c87c27f5a977abcf9500e9a23860b5b23f0917a Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Sat, 25 Nov 2023 11:32:12 +0900 Subject: [PATCH] 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 759ec1113d0a1d6315b38bd83ec3562dacc08238 --- pkgs/servers/monitoring/plugins/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/monitoring/plugins/default.nix b/pkgs/servers/monitoring/plugins/default.nix index 2f6122caa69e..6f3d8c5ffd89 100644 --- a/pkgs/servers/monitoring/plugins/default.nix +++ b/pkgs/servers/monitoring/plugins/default.nix @@ -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