[packages/nagios-plugin-check_iptables] sudo requires abs path for iptables

glen glen at pld-linux.org
Tue Apr 4 14:25:10 CEST 2017


commit 31fae399735083e4a8a71ea9a1291bdc120631d0
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Apr 4 15:25:05 2017 +0300

    sudo requires abs path for iptables

 check_iptables.sh                 | 2 +-
 nagios-plugin-check_iptables.spec | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/nagios-plugin-check_iptables.spec b/nagios-plugin-check_iptables.spec
index b7fb027..9183c10 100644
--- a/nagios-plugin-check_iptables.spec
+++ b/nagios-plugin-check_iptables.spec
@@ -2,7 +2,7 @@
 Summary:	Nagios plugin to check count of iptables rules
 Name:		nagios-plugin-%{plugin}
 Version:	0.2
-Release:	1
+Release:	2
 License:	GPL v2
 Group:		Networking
 Source0:	%{plugin}.sh
diff --git a/check_iptables.sh b/check_iptables.sh
index 748edbd..82082ea 100755
--- a/check_iptables.sh
+++ b/check_iptables.sh
@@ -8,7 +8,7 @@ ARGS="$*"
 
 . $PROGPATH/utils.sh
 
-iptables=iptables
+iptables=$(which iptables 2>/dev/null || echo /usr/sbin/iptables)
 sudo=sudo
 chain=INPUT
 table=filter
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_iptables.git/commitdiff/31fae399735083e4a8a71ea9a1291bdc120631d0



More information about the pld-cvs-commit mailing list