SOURCES: awffull.sysconfig, awffull.cron - allow to use dnshistory...

blues blues at pld-linux.org
Wed Jun 28 00:39:48 CEST 2006


Author: blues                        Date: Tue Jun 27 22:39:48 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- allow to use dnshistory for DNS resolving. Not tested yet.

---- Files affected:
SOURCES:
   awffull.sysconfig (1.1 -> 1.2) , awffull.cron (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/awffull.sysconfig
diff -u SOURCES/awffull.sysconfig:1.1 SOURCES/awffull.sysconfig:1.2
--- SOURCES/awffull.sysconfig:1.1	Tue Jun 27 13:06:59 2006
+++ SOURCES/awffull.sysconfig	Wed Jun 28 00:39:43 2006
@@ -9,8 +9,13 @@
 # Allow multiple configs in /etc/awffull/
 MULTIPLE="yes"
 
+# Use dnshistory for resolving IP into DNS-name
+# Warning: you need to install dnshistory package to have it working!
+# USE_DNSHISTORY="yes"
+
 # Supress messages
 # QUIET="yes"
 
 # Don't display any messages
 #REALLY_QUIET="yes"
+

================================================================
Index: SOURCES/awffull.cron
diff -u SOURCES/awffull.cron:1.1 SOURCES/awffull.cron:1.2
--- SOURCES/awffull.cron:1.1	Tue Jun 27 13:06:59 2006
+++ SOURCES/awffull.cron	Wed Jun 28 00:39:43 2006
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 AWFFULL_OPTS=""
+CONFIG_LIST=""
 [ -f /etc/sysconfig/awffull ] && . /etc/sysconfig/awffull
 umask 0022
 
@@ -16,11 +17,19 @@
 	fi
 	
 	if [ -f /etc/awffull.conf ]; then
-		awffull ${AWFFULL_OPTS} -c /etc/awffull.conf
+		CONFIG_LIST="/etc/awffull.conf"
 	fi
 	if [ -n "$MULTIPLE" ] && [ "$MULTIPLE" = "yes" -o "$MULTIPLE" = "YES" ]; then
-		for i in $(ls /etc/awffull/*.conf 2>/dev/null); do
-			awffull ${AWFFULL_OPTS} -c $i;
+		for config in $(ls /etc/awffull/*.conf 2>/dev/null); do\
+			CONFIG_LIST="${CONFIG_LIST} ${config}"
 		done
 	fi
+	for singleconfig in ${CONFIG_LIST}; do
+		if [ -n "${USE_DNSHISTORY}" ] && [ "${USE_DNSHISTORY}" = "yes" -o "${USE_DNSHISTORY}" = "YES" ]; then
+			LOGFILE=`grep ^LogFile ${singleconfig} | awk '{ print $2;}'`
+			dnshistory -T -f ${LOGFILE} | awffull ${AWFFULL_OPTS} -c ${singleconfig} - ;
+		else
+			awffull ${AWFFULL_OPTS} -c ${singleconfig};
+		fi
+	done
 fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/awffull.sysconfig?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/SOURCES/awffull.cron?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list