Index: trunk/debs/wikimedia-task-dns-auth/gen-zones |
— | — | @@ -29,15 +29,18 @@ |
30 | 30 | # <var>:<domainname> |
31 | 31 | # For instance: |
32 | 32 | # $langlist_wikimedia:wikimedia-lb.wikimedia.org. |
| 33 | + domainlist = {} |
33 | 34 | domainmap = open(domainmaplist) |
34 | | - domainlist = {} |
35 | | - for map in domainmap: |
| 35 | + for map in domainmap.readlines(): |
| 36 | + if map[0] == "#": |
| 37 | + continue |
| 38 | + map = map.strip() |
36 | 39 | var, value = map.split(':') |
37 | 40 | domainlist[var] = value |
38 | 41 | |
39 | 42 | # All substs[var] in this loop contain a list of CNAMES to the geodns record for |
40 | 43 | # all language subdomains |
41 | | - for var, value in domainlist.itervalues(): |
| 44 | + for var, value in domainlist.iteritems(): |
42 | 45 | list = open(langlist).read() |
43 | 46 | list = list.replace('$cnamedomain', value) |
44 | 47 | substs[var] = list |
Index: trunk/debs/wikimedia-task-dns-auth/gen-langlist-cnames |
— | — | @@ -8,6 +8,6 @@ |
9 | 9 | LANGLIST=$POWERDNSDIR/langlist |
10 | 10 | LANGLISTSOURCE="" |
11 | 11 | |
12 | | -[ $LANGLIST -nt $POWERDNSDIR/langlist-cnames ] && < $LANGLIST awk '{ print $1"\t\t\t1H\tIN CNAME\t\$cnamedomain"; print"www."$1"\t\t\t1H\tIN CNAME\t\$cnamedomain"; print $1".m\t\t\t1H\tIN CNAME\tm.wikimedia.org." }' > $POWERDNSDIR/langlist-cnames |
| 12 | +[ $LANGLIST -nt $POWERDNSDIR/langlist-cnames ] && < $LANGLIST awk '{ print $1"\t\t\t1H\tIN CNAME\t$cnamedomain"; print"www."$1"\t\t\t1H\tIN CNAME\t$cnamedomain"; print $1".m\t\t\t1H\tIN CNAME\tm.wikimedia.org." }' > $POWERDNSDIR/langlist-cnames |
13 | 13 | |
14 | 14 | exit 0 |