ssahani / rpms / freeradius

Forked from rpms/freeradius 5 years ago
Clone
c5829a9
From 1b32a0e398871f0f5b7b41d200b1b9db371e84d5 Mon Sep 17 00:00:00 2001
c5829a9
From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
c5829a9
Date: Mon, 15 Dec 2014 16:48:26 +0200
c5829a9
Subject: [PATCH 1/1] raddb: Move trigger.conf INCLUDE before modules
c5829a9
c5829a9
Move "$INCLUDE trigger.conf" chunk before module section in
c5829a9
"radiusd.conf.in". This makes it possible to reference "snmptrap" and
c5829a9
related trigger variables under "pool.trigger" in module configurations,
c5829a9
simplifying them.
c5829a9
c5829a9
E.g. like this (in raddb/mods-enabled/ldap):
c5829a9
c5829a9
ldap ldap_instance {
c5829a9
    pool {
c5829a9
        trigger {
c5829a9
            args = "radiusdModuleName s '${...:name}' radiusdModuleInstance s '${...:instance}'"
c5829a9
            open = "${snmptrap}::serverModuleConnectionUp ${args}"
c5829a9
            close = "${snmptrap}::serverModuleConnectionDown ${args}"
c5829a9
        }
c5829a9
    }
c5829a9
}
c5829a9
---
c5829a9
 raddb/radiusd.conf.in | 16 ++++++++--------
c5829a9
 1 file changed, 8 insertions(+), 8 deletions(-)
c5829a9
c5829a9
diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in
c5829a9
index c6d5834..fb7d1bd 100644
c5829a9
--- a/raddb/radiusd.conf.in
c5829a9
+++ b/raddb/radiusd.conf.in
c5829a9
@@ -648,6 +648,14 @@ thread pool {
c5829a9
 	auto_limit_acct = no
c5829a9
 }
c5829a9
 
c5829a9
+######################################################################
c5829a9
+#
c5829a9
+#  SNMP notifications.  Uncomment the following line to enable
c5829a9
+#  snmptraps.  Note that you MUST also configure the full path
c5829a9
+#  to the "snmptrap" command in the "trigger.conf" file.
c5829a9
+#
c5829a9
+#$INCLUDE trigger.conf
c5829a9
+
c5829a9
 # MODULE CONFIGURATION
c5829a9
 #
c5829a9
 #  The names and configuration of each module is located in this section.
c5829a9
@@ -780,14 +788,6 @@ policy {
c5829a9
 
c5829a9
 ######################################################################
c5829a9
 #
c5829a9
-#  SNMP notifications.  Uncomment the following line to enable
c5829a9
-#  snmptraps.  Note that you MUST also configure the full path
c5829a9
-#  to the "snmptrap" command in the "trigger.conf" file.
c5829a9
-#
c5829a9
-#$INCLUDE trigger.conf
c5829a9
-
c5829a9
-######################################################################
c5829a9
-#
c5829a9
 #	Load virtual servers.
c5829a9
 #
c5829a9
 #	This next $INCLUDE line loads files in the directory that
c5829a9
-- 
c5829a9
2.1.3
c5829a9