summaryrefslogtreecommitdiff
path: root/tz/ziguard.awk
diff options
context:
space:
mode:
Diffstat (limited to 'tz/ziguard.awk')
-rw-r--r--tz/ziguard.awk11
1 files changed, 6 insertions, 5 deletions
diff --git a/tz/ziguard.awk b/tz/ziguard.awk
index 7d6f7c9..6888c27 100644
--- a/tz/ziguard.awk
+++ b/tz/ziguard.awk
@@ -114,15 +114,16 @@ DATAFORM != "main" {
}
}
-# If a Link line is followed by a Zone line for the same data, comment
+# If a Link line is followed by a Link or Zone line for the same data, comment
# out the Link line. This can happen if backzone overrides a Link
-# with a Zone.
-/^Link/ {
- linkline[$3] = NR
-}
+# with a Zone or a different Link.
/^Zone/ {
sub(/^Link/, "#Link", line[linkline[$2]])
}
+/^Link/ {
+ sub(/^Link/, "#Link", line[linkline[$3]])
+ linkline[$3] = NR
+}
{ line[NR] = $0 }