Author: locilka Date: Tue Nov 4 19:22:26 2008 New Revision: 52897 URL: http://svn.opensuse.org/viewcvs/yast?rev=52897&view=rev Log: - However entries are stored in LDAP, .ldap.search returns them in thisStrangeFormat. Moreover, DNS records entries are stored format tXTRecord for TXT record, cNAMERecord for CNAME, etc. (bnc #433899) - 2.17.8 Modified: trunk/dns-server/VERSION trunk/dns-server/package/yast2-dns-server.changes trunk/dns-server/src/DnsZones.pm Modified: trunk/dns-server/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/dns-server/VERSION?rev=52897&r1=52896&r2=52897&view=diff ============================================================================== --- trunk/dns-server/VERSION (original) +++ trunk/dns-server/VERSION Tue Nov 4 19:22:26 2008 @@ -1 +1 @@ -2.17.7 +2.17.8 Modified: trunk/dns-server/package/yast2-dns-server.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/dns-server/package/yast2-dns-server.changes?rev=52897&r1=52896&r2=52897&view=diff ============================================================================== --- trunk/dns-server/package/yast2-dns-server.changes (original) +++ trunk/dns-server/package/yast2-dns-server.changes Tue Nov 4 19:22:26 2008 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Tue Nov 4 19:18:14 CET 2008 - locilka@suse.cz + +- However entries are stored in LDAP, .ldap.search returns them + in thisStrangeFormat. Moreover, DNS records entries are stored + format tXTRecord for TXT record, cNAMERecord for CNAME, etc. + (bnc #433899) +- 2.17.8 + +------------------------------------------------------------------- Thu Aug 28 15:04:26 CEST 2008 - locilka@suse.cz - Dropped dead code (widgets.ycp). Modified: trunk/dns-server/src/DnsZones.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/dns-server/src/DnsZones.pm?rev=52897&r1=52896&r2=52897&view=diff ============================================================================== --- trunk/dns-server/src/DnsZones.pm (original) +++ trunk/dns-server/src/DnsZones.pm Tue Nov 4 19:22:26 2008 @@ -46,10 +46,26 @@ our @ISA = qw(Exporter); our @EXPORT_OK = qw($zone_base_config_dn); -my @all_rec_types = ("mx", "ns", "a", "aaaa", "md", "cname", "ptr", "hinfo", +my @tmp_all_rec_types = ("mx", "ns", "a", "aaaa", "md", "cname", "ptr", "hinfo", "minfo", "txt", "sig", "key", "aaa", "loc", "nxtr", "srv", "naptr", "kx", "cert", "a6", "dname"); +my @all_rec_types = (); + +# See bnc #433899 +sub drunkCamelType { + my $rectype = shift; + + if ($rectype =~ m/^(.)(.*)$/) { + $rectype = lc($1).uc($2); + } + + return $rectype; +} + +foreach my $one_rectype (@tmp_all_rec_types) { + push @all_rec_types, drunkCamelType ($one_rectype); +} ##------------------------------------------------------------------------- ##----------------- various routines -------------------------------------- @@ -469,6 +485,8 @@ my $zone_dn = "zoneName=$zone,$zone_base_config_dn"; + y2milestone ("Reading zone from LDAP: ".$zone_dn); + # the search config map my %ldap_query = ( "base_dn" => $zone_dn, @@ -509,7 +527,7 @@ "serial" => $self->UpdateSerial ($soa_lst[2]), ); - my @ttl_lst = @{$zonemap{"dnsttl"} || []}; + my @ttl_lst = @{$zonemap{"dNSTTL"} || []}; my $ttl = $ttl_lst[0]; my %ret = ( @@ -539,7 +557,7 @@ foreach my $rec_type (@all_rec_types) { - my $value_key = $rec_type . "record"; + my $value_key = $rec_type."Record"; my @values = @{$record{$value_key} || []}; foreach my $value (@values) { @@ -698,7 +716,7 @@ } @records; foreach my $rec_ref (@current_records) { - my $type = lc ($rec_ref->{"type"}) . "record"; + my $type = drunkCamelType ($rec_ref->{"type"})."Record"; my @cur_vals = @{$ldap_record{$type} || []}; push @cur_vals, $rec_ref->{"value"}; $ldap_record{$type} = \@cur_vals; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org