Hi,
I'm sending a couple of post release fixes for dnssec-trigger-scripts.
Cheers,
Pavel
From b79d2097e21b94621fd3de2266c961fc2d0b7711 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psime...@redhat.com>
Date: Wed, 7 May 2014 12:41:57 +0200
Subject: [PATCH 1/3] handle dns=none and dns=unbound properly
This, among other things, allows to restart unbound and/or
dnssec-trigger without restarting NetworkManager when it's
configured not to touch the DNS.
---
dnssec-trigger-script.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dnssec-trigger-script.in b/dnssec-trigger-script.in
index b572dd1..8c789c4 100644
--- a/dnssec-trigger-script.in
+++ b/dnssec-trigger-script.in
@@ -335,7 +335,7 @@ class Application:
try:
with open("/etc/NetworkManager/NetworkManager.conf") as nm_config_file:
for line in nm_config_file:
- if line.strip == "dns=none":
+ if line.strip() in ("dns=none", "dns=unbound"):
return False
except IOError:
pass
--
1.8.3.2
From dffb503f2ab15165b1d54b966559e8880e3c0e89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psime...@redhat.com>
Date: Tue, 3 Jun 2014 14:46:08 +0200
Subject: [PATCH 2/3] avoid FileNotFoundError not available in Python 2
https://bugzilla.redhat.com/show_bug.cgi?id=1100794
---
dnssec-trigger-script.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dnssec-trigger-script.in b/dnssec-trigger-script.in
index 8c789c4..1ed482e 100644
--- a/dnssec-trigger-script.in
+++ b/dnssec-trigger-script.in
@@ -10,6 +10,8 @@ import os, sys, shutil, subprocess
import logging, logging.handlers
import socket, struct
+
+
DEVNULL = open("/dev/null", "wb")
log = logging.getLogger()
@@ -255,7 +257,7 @@ class Store:
line = line.strip()
if line:
self.cache.add(line)
- except FileNotFoundError:
+ except IOError:
pass
log.debug(self)
@@ -309,7 +311,7 @@ class GlobalForwarders:
line = line.strip()
if line:
self.cache.add(line)
- except FileNotFoundError:
+ except IOError:
pass
class Application:
--
1.8.3.2
From 2efbf013a0e36671d4821b490e9454736c8d830d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20=C5=A0imerda?= <psime...@redhat.com>
Date: Tue, 3 Jun 2014 14:50:48 +0200
Subject: [PATCH 3/3] fix unbound output parser
https://bugzilla.redhat.com/show_bug.cgi?id=1100796
---
dnssec-trigger-script.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dnssec-trigger-script.in b/dnssec-trigger-script.in
index 1ed482e..297e36a 100644
--- a/dnssec-trigger-script.in
+++ b/dnssec-trigger-script.in
@@ -192,7 +192,7 @@ class UnboundZoneConfig:
if fields.pop(0) in ('forward', 'forward:'):
fields.pop(0)
secure = False
- if fields[0] == '+i':
+ if fields and fields[0] == '+i':
secure = True
fields.pop(0)
self.cache[name] = set(fields[3:]), secure
--
1.8.3.2
_______________________________________________
dnssec-trigger mailing list
dnssec-trigger@NLnetLabs.nl
http://open.nlnetlabs.nl/mailman/listinfo/dnssec-trigger