[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.6-44-gcddc730

Andreas B. Mundt andi at debian.org
Thu Sep 20 12:17:58 UTC 2012


The following commit has been merged in the master branch:
commit cddc730043eb8e34de804413363a0174d9fe89f4
Author: Andreas B. Mundt <andi at debian.org>
Date:   Thu Sep 20 14:08:03 2012 +0200

    Fix munin node:  Dynamically find IP address of munin gatherer host.

diff --git a/fai/config/scripts/LOG_CLIENT/20-munin-node.conf b/fai/config/scripts/LOG_CLIENT/20-munin-node.conf
index 09e9b74..b7bd2db 100755
--- a/fai/config/scripts/LOG_CLIENT/20-munin-node.conf
+++ b/fai/config/scripts/LOG_CLIENT/20-munin-node.conf
@@ -1,15 +1,12 @@
-#!/usr/sbin/cfagent -f
+#!/bin/bash
+#
+#  allow the host syslog to access the munin node
+#
 
-control:
-   any::
-   actionsequence = ( editfiles )
-   EditFileSize = ( 30000 )
+set -e
 
-editfiles:
-   any::
-      { ${target}/etc/munin/munin-node.conf
-	  BeginGroupIfNoSuchLine "allow ^10\\.0\\.0\\.1$"
-	    LocateLineMatching "allow \^127\\\.0\\\.0\\\.1\$"
-	    InsertLine "allow ^10\\.0\\.0\\.1$"
-	  EndGroup
-      }
+IP=`host syslog | tail -n 1 | awk '{print $NF}'| sed "s%\.%\\\\\\\.%g"`
+
+if [ -n $IP ] ; then
+    ainsl -Q /etc/munin/munin-node.conf "allow ^${IP}$" "allow ^${IP}$"
+fi

-- 
Debian-LAN development and packaging



More information about the debian-lan-devel mailing list