Blame SOURCES/bz1435171-named-add-support-for-rndc-options.patch

15862b
From b78c5e48568f97415de03f68d0c8b747229c4281 Mon Sep 17 00:00:00 2001
15862b
From: Bas Couwenberg <sebastic@xs4all.nl>
15862b
Date: Wed, 22 Mar 2017 15:46:50 +0100
15862b
Subject: [PATCH] Add support for rndc options in named resource agent.
15862b
15862b
---
15862b
 heartbeat/named | 14 ++++++++++++--
15862b
 1 file changed, 12 insertions(+), 2 deletions(-)
15862b
15862b
diff --git a/heartbeat/named b/heartbeat/named
15862b
index 2118e0c..4856cdc 100755
15862b
--- a/heartbeat/named
15862b
+++ b/heartbeat/named
15862b
@@ -25,6 +25,7 @@ OCF_RESKEY_named_pidfile_default="/var/run/named/named.pid"
15862b
 OCF_RESKEY_named_rootdir_default=""
15862b
 OCF_RESKEY_named_options_default=""
15862b
 OCF_RESKEY_named_keytab_file_default=""
15862b
+OCF_RESKEY_rndc_options_default=""
15862b
 OCF_RESKEY_monitor_request_default="localhost"
15862b
 OCF_RESKEY_monitor_response_default="127.0.0.1"
15862b
 OCF_RESKEY_monitor_ip_default="127.0.0.1"
15862b
@@ -38,6 +39,7 @@ OCF_RESKEY_monitor_ip_default="127.0.0.1"
15862b
 : ${OCF_RESKEY_named_rootdir=${OCF_RESKEY_named_rootdir_default}}
15862b
 : ${OCF_RESKEY_named_options=${OCF_RESKEY_named_options_default}}
15862b
 : ${OCF_RESKEY_named_keytab_file=${OCF_RESKEY_named_keytab_file_default}}
15862b
+: ${OCF_RESKEY_rndc_options=${OCF_RESKEY_rndc_options_default}}
15862b
 : ${OCF_RESKEY_monitor_request=${OCF_RESKEY_monitor_request_default}}
15862b
 : ${OCF_RESKEY_monitor_response=${OCF_RESKEY_monitor_response_default}}
15862b
 : ${OCF_RESKEY_monitor_ip=${OCF_RESKEY_monitor_ip_default}}
15862b
@@ -144,6 +146,14 @@ named service keytab file (for GSS-TSIG).
15862b
 <content type="string" default="${OCF_RESKEY_named_keytab_file_default}" />
15862b
 </parameter>
15862b
 
15862b
+<parameter name="rndc_options" unique="0" required="0">
15862b
+<longdesc lang="en">
15862b
+Options for rndc process if any.
15862b
+</longdesc>
15862b
+<shortdesc lang="en">rndc_options</shortdesc>
15862b
+<content type="string" default="${OCF_RESKEY_rndc_options_default}" />
15862b
+</parameter>
15862b
+
15862b
 <parameter name="monitor_request" unique="0" required="0">
15862b
 <longdesc lang="en">
15862b
 Request that shall be sent to named for monitoring. Usually an A record in DNS.
15862b
@@ -326,7 +336,7 @@ named_monitor() {
15862b
 #
15862b
 
15862b
 named_reload() {
15862b
-    $OCF_RESKEY_rndc reload >/dev/null || return $OCF_ERR_GENERIC
15862b
+    $OCF_RESKEY_rndc $OCF_RESKEY_rndc_options reload >/dev/null || return $OCF_ERR_GENERIC
15862b
     
15862b
     return $OCF_SUCCESS
15862b
 }
15862b
@@ -396,7 +406,7 @@ named_stop () {
15862b
     
15862b
     named_status || return $OCF_SUCCESS
15862b
     
15862b
-    $OCF_RESKEY_rndc stop >/dev/null
15862b
+    $OCF_RESKEY_rndc $OCF_RESKEY_rndc_options stop >/dev/null
15862b
     if [ $? -ne 0 ]; then
15862b
         ocf_log info "rndc stop failed. Killing named."
15862b
         kill `cat ${OCF_RESKEY_named_pidfile}`