SOURCES: munin-plugins.patch - fixed amavis plugin settings - use full path...

baggins baggins at pld-linux.org
Tue May 20 13:06:26 CEST 2008


Author: baggins                      Date: Tue May 20 11:06:26 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fixed amavis plugin settings
- use full path to iptables

---- Files affected:
SOURCES:
   munin-plugins.patch (1.18 -> 1.19) 

---- Diffs:

================================================================
Index: SOURCES/munin-plugins.patch
diff -u SOURCES/munin-plugins.patch:1.18 SOURCES/munin-plugins.patch:1.19
--- SOURCES/munin-plugins.patch:1.18	Fri Apr  4 11:30:42 2008
+++ SOURCES/munin-plugins.patch	Tue May 20 13:06:21 2008
@@ -13,7 +13,7 @@
 +
 +[amavis]
 +user root
-+env.logfile /var/log/maillog
++env.amavislog /var/log/maillog
 +
 +[courier*]
 +user root
@@ -741,3 +741,113 @@
 +	print "pathconf.value " nfs_pathconf
 +	print "commit.value " nfs_commit
 +}' $NFSD
+--- munin-1.3.4/node/node.d.linux/ip_.in~	2008-03-08 02:42:39.000000000 +0100
++++ munin-1.3.4/node/node.d.linux/ip_.in	2008-05-20 13:00:17.000000000 +0200
+@@ -40,16 +40,16 @@
+ 	# This is a fun hack to make the plugin ip6 compatible.
+ 	# Suggested in ticket #439 by "jodal".
+ 	eval 'function iptables() {
+-	    /sbin/ip6tables "$@"
++	    /usr/sbin/ip6tables "$@"
+ 	}'
+ 	;;
+ esac
+ 
+ if [ "$1" = "autoconf" ]; then
+ 	if [ -r /proc/net/dev ]; then
+-		iptables -L ${INPUT} -v -n -x >/dev/null 2>/dev/null
++		/usr/sbin/iptables -L ${INPUT} -v -n -x >/dev/null 2>/dev/null
+ 		if [ $? -gt 0 ]; then
+-			echo "no (could not run iptables as user `whoami`)"
++			echo "no (could not run /usr/sbin/iptables as user `whoami`)"
+ 			exit 1
+ 		else
+ 			echo yes
+@@ -62,7 +62,7 @@
+ fi
+ 
+ if [ "$1" = "suggest" ]; then
+-	iptables -L ${INPUT} -v -n -x 2>/dev/null | awk '$8 ~ /[0-9]/ { if (done[$8]!=1) {print $8; done[$8]=1;}}'
++	/usr/sbin/iptables -L ${INPUT} -v -n -x 2>/dev/null | awk '$8 ~ /[0-9]/ { if (done[$8]!=1) {print $8; done[$8]=1;}}'
+ 	exit 0
+ fi
+ 
+@@ -84,6 +84,6 @@
+         exit 0
+ fi;
+ 
+-iptables -L ${INPUT} -v -n -x | grep -m1 $IP | awk "{ print \"in.value \" \$2 }"
+-iptables -L ${OUTPUT} -v -n -x | grep -m1 $IP | awk "{ print \"out.value \" \$2 }"
++/usr/sbin/iptables -L ${INPUT} -v -n -x | grep -m1 $IP | awk "{ print \"in.value \" \$2 }"
++/usr/sbin/iptables -L ${OUTPUT} -v -n -x | grep -m1 $IP | awk "{ print \"out.value \" \$2 }"
+ 
+--- munin-1.3.4/node/node.d.linux/vlan_inetuse_.in~	2008-03-08 02:42:39.000000000 +0100
++++ munin-1.3.4/node/node.d.linux/vlan_inetuse_.in	2008-05-20 13:00:50.000000000 +0200
+@@ -37,8 +37,8 @@
+ my %in_octets = ();
+ my %out_octets = ();
+ 
+-open (IN, "/sbin/iptables -v -x -L $INTERFACE-in |") or 
+-	die "Could not run iptables: $!\n";
++open (IN, "/usr/sbin/iptables -v -x -L $INTERFACE-in |") or 
++	die "Could not run /usr/sbin/iptables: $!\n";
+ while (<IN>)
+ {
+ 	if (/^\s*\d+\s+(\d+)  +([a-z]+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+(?:\s+|)(.+|)$/)
+@@ -49,10 +49,10 @@
+ 	}
+ }
+ close IN;
+-die "Error running iptables. Dying\n" if $?;
++die "Error running /usr/sbin/iptables. Dying\n" if $?;
+ 
+-open (IN, "/sbin/iptables -v -x -L $INTERFACE-out |") or 
+-	die "Could not run iptables: $!\n";
++open (IN, "/usr/sbin/iptables -v -x -L $INTERFACE-out |") or 
++	die "Could not run /usr/sbin/iptables: $!\n";
+ while (<IN>)
+ {
+ 	if (/^\s*\d+\s+(\d+)  +([a-z]+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+(?:\s+|)(.+|)$/)
+@@ -67,7 +67,7 @@
+ 	}
+ }
+ close IN;
+-die "Error running iptables. Dying\n" if $?;
++die "Error running /usr/sbin/iptables. Dying\n" if $?;
+ 
+ if ($ARGV[0] and $ARGV[0] eq "config")
+ {
+--- munin-1.3.4/node/node.d.linux/vlan_linkuse_.in~	2008-03-08 02:42:39.000000000 +0100
++++ munin-1.3.4/node/node.d.linux/vlan_linkuse_.in	2008-05-20 13:01:48.000000000 +0200
+@@ -29,8 +29,8 @@
+ my %in_octets = ();
+ my %out_octets = ();
+ 
+-open (IN, "/sbin/iptables -v -x -L $INTERFACE-in |") or 
+-	die "Could not run iptables: $!\n";
++open (IN, "/usr/sbin/iptables -v -x -L $INTERFACE-in |") or 
++	die "Could not run /usr/sbin/iptables: $!\n";
+ while (<IN>)
+ {
+ 	if (/^\s*\d+\s+(\d+)  +([a-z]+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+(?:\s+|)(.+|)$/)
+@@ -58,10 +58,10 @@
+ 	}
+ }
+ close IN;
+-die "Error running iptables. Dying\n" if $?;
++die "Error running /usr/sbin/iptables. Dying\n" if $?;
+ 
+-open (IN, "/sbin/iptables -v -x -L $INTERFACE-out |") or 
+-	die "Could not run iptables: $!\n";
++open (IN, "/usr/sbin/iptables -v -x -L $INTERFACE-out |") or 
++	die "Could not run /usr/sbin/iptables: $!\n";
+ while (<IN>)
+ {
+ 	if (/^\s*\d+\s+(\d+)  +([a-z]+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+(?:\s+|)(.+|)$/)
+@@ -84,5 +84,5 @@
+ 	}
+ }
+ close IN;
+-die "Error running iptables. Dying\n" if $?;
++die "Error running /usr/sbin/iptables. Dying\n" if $?;
+ # vim:syntax=perl
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/munin-plugins.patch?r1=1.18&r2=1.19&f=u



More information about the pld-cvs-commit mailing list