summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Hozza <thozza@redhat.com>2013-08-16 13:08:20 +0200
committerTomas Hozza <thozza@redhat.com>2013-08-16 13:10:16 +0200
commitf4a585a9ae0f11ce5a1fac11766f2df3b69079d7 (patch)
tree7cb0666a7fe5780a1da559c82211b593b318d7da
parentbceb4447019757d579ccf9e368a5441847dca4b3 (diff)
Don't generate rndc.key if there exists rndc.conf
Signed-off-by: Tomas Hozza <thozza@redhat.com>
-rw-r--r--bind.spec5
-rwxr-xr-xgenerate-rndc-key.sh4
2 files changed, 6 insertions, 3 deletions
diff --git a/bind.spec b/bind.spec
index 642c19c..ffd1964 100644
--- a/bind.spec
+++ b/bind.spec
@@ -26,7 +26,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: ISC
Version: 9.9.3
-Release: 6.%{?PATCHVER}%{?dist}
+Release: 7.%{?PATCHVER}%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -781,6 +781,9 @@ rm -rf ${RPM_BUILD_ROOT}
%endif
%changelog
+* Fri Aug 16 2013 Tomas Hozza <thozza@redhat.com> 32:9.9.3-7.P2
+- Don't generate rndc.key if there exists rndc.conf
+
* Fri Aug 16 2013 Tomas Hozza <thozza@redhat.com> 32:9.9.3-6.P2
- don't install named-sdb.service if SDB macro is defined to zero
diff --git a/generate-rndc-key.sh b/generate-rndc-key.sh
index 5678413..454e7fe 100755
--- a/generate-rndc-key.sh
+++ b/generate-rndc-key.sh
@@ -2,9 +2,9 @@
. /etc/rc.d/init.d/functions
-# This script generates /etc/rndc.key if doesn't exist
+# This script generates /etc/rndc.key if doesn't exist AND if there is no rndc.conf
-if [ ! -s /etc/rndc.key ]; then
+if [ ! -s /etc/rndc.key -a ! -s /etc/rndc.conf ]; then
echo -n $"Generating /etc/rndc.key:"
if /usr/sbin/rndc-confgen -a > /dev/null 2>&1; then
chmod 640 /etc/rndc.key