From 21af6d5ee16f645e9bf58e3a86fed114da64f69a Mon Sep 17 00:00:00 2001 From: Marc Date: Fri, 17 Oct 2014 13:57:34 +0000 Subject: [PATCH] Fixes on domain backend --- orchestra/apps/domains/backends.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orchestra/apps/domains/backends.py b/orchestra/apps/domains/backends.py index 0e18e5a0..8af24edf 100644 --- a/orchestra/apps/domains/backends.py +++ b/orchestra/apps/domains/backends.py @@ -42,7 +42,7 @@ class Bind9MasterDomainBackend(ServiceController): self.append(textwrap.dedent("""\ cat -s <(sed -e 's/^};/};\\n/' %(conf_path)s) | \\ awk -v s=pangea.cat 'BEGIN { RS=""; s="zone \\""s"\\"" } $0~s{ print }' | \\ - diff -I"^\s*//" - <(echo '%(conf)s') || { + diff -B -I"^\s*//" - <(echo '%(conf)s') || { cat -s <(sed -e 's/^};/};\\n/' %(conf_path)s) | \\ awk -v s="%(name)s" 'BEGIN { RS=""; s="zone \\""s"\\"" } $0!~s{ print $0"\\n" }' \\ > %(conf_path)s.tmp @@ -69,7 +69,7 @@ class Bind9MasterDomainBackend(ServiceController): awk -v s="%(name)s" 'BEGIN { RS=""; s="zone \\""s"\\"" } $0!~s{ print $0"\\n" }' \\ > %(conf_path)s.tmp""" % context )) - self.append('diff -I"^\s*//" %(conf_path)s.tmp %(conf_path)s || UPDATED=1' % context) + self.append('diff -B -I"^\s*//" %(conf_path)s.tmp %(conf_path)s || UPDATED=1' % context) self.append('mv %(conf_path)s.tmp %(conf_path)s' % context) def commit(self):