From d056e2d95cbdfcf8bb6e8039f25d730763be4f2f Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 12 Jan 2010 21:46:33 +0000 Subject: [PATCH] just use inetutils-ping on non-linux --- debian/changelog | 7 +++---- debian/rules | 13 +++++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3052860..5ff39c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,11 +18,10 @@ nagios-plugins (1.4.14-1) unstable; urgency=low * Add 40_check_http_proxy_auth.dpatch to make check_http able to check proxy authorization * Update copyright, thanks to Robert Millan (Closes: 548303) - * Depend on inetutils-ping instead of iputils-ping, thanks to Petr Salinger + * Depend on inetutils-ping on kfreebsd and hurd, thanks to Petr Salinger (Closes: #555532) - - Use '-n -c %d %s' as ping argument, since unfortunately '-U -w %d' isn't - supported by inetutils-ping - - Add 41_check_ping_detect_args.dpatch, that to Thomas Guyot-Sionnest + - Use '-n -c %d %s' as ping argument on archs where inetutils-ping is used + - Add 41_check_ping_detect_args.dpatch, thanks to Thomas Guyot-Sionnest * Add hint to NEWS.Debian, that check_linux_raid.pl and check_bgpstate will be removed in the next future * Add 42_check_linux_raid_fix_r10.dpatch, which fixes RAID Levels with more diff --git a/debian/rules b/debian/rules index 0df4605..552675d 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,7 @@ include /usr/share/dpatch/dpatch.make # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) CFLAGS = -Wall -g @@ -47,6 +48,15 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif +ifeq ($(DEB_HOST_ARCH_OS),linux) +PING_CONFIGURE_ARGS = --with-ping-command="/bin/ping -n -U -w %d -c %d %s" \ + --with-ping6-command="/bin/ping6 -n -U -w %d -c %d %s" +else +PING_CONFIGURE_ARGS = --with-ping-command="/bin/ping -n -c %d %s" \ + --with-ping6-command="/bin/ping6 -n -c %d %s" +endif + + config.status: configure export PATH=$(PATH) dh_testdir @@ -81,8 +91,7 @@ config.status: configure --with-ps-format="%s %d %d %d %d %d %f %s %s %n" \ --with-ps-cols=10 \ --with-ps-varlist="procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos" \ - --with-ping-command="/bin/ping -n -c %d %s" \ - --with-ping6-command="/bin/ping6 -n -c %d %s" \ + $(PING_CONFIGURE_ARGS) \ --with-nslookup-command="/usr/bin/nslookup -sil" \ --with-uptime-command="/usr/bin/uptime" \ --with-rpcinfo-command="/usr/bin/rpcinfo" \