Author: locilka Date: Wed Aug 6 16:05:27 2008 New Revision: 49777 URL: http://svn.opensuse.org/viewcvs/yast?rev=49777&view=rev Log: - DNS zones need a FQDN hostname, using /etc/HOSTNAME as a fallback when hostname --fqdn returns empty string (bnc #403468). - 2.17.5 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=49777&r1=49776&r2=49777&view=diff ============================================================================== --- trunk/dns-server/VERSION (original) +++ trunk/dns-server/VERSION Wed Aug 6 16:05:27 2008 @@ -1 +1 @@ -2.17.4 +2.17.5 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=49777&r1=49776&r2=49777&view=diff ============================================================================== --- trunk/dns-server/package/yast2-dns-server.changes (original) +++ trunk/dns-server/package/yast2-dns-server.changes Wed Aug 6 16:05:27 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Aug 6 15:54:32 CEST 2008 - locilka@suse.cz + +- DNS zones need a FQDN hostname, using /etc/HOSTNAME as a fallback + when hostname --fqdn returns empty string (bnc #403468). +- 2.17.5 + +------------------------------------------------------------------- Tue Aug 5 10:53:13 CEST 2008 - locilka@suse.cz - Adjusted to the newest LDAP SCR agent (patch written by jsuchome) Modified: trunk/dns-server/src/DnsZones.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/dns-server/src/DnsZones.pm?rev=49777&r1=49776&r2=49777&view=diff ============================================================================== --- trunk/dns-server/src/DnsZones.pm (original) +++ trunk/dns-server/src/DnsZones.pm Wed Aug 6 16:05:27 2008 @@ -58,13 +58,20 @@ my $self = shift; my $out = SCR->Execute (".target.bash_output", "/bin/hostname --fqdn"); - if ($out->{"exit"} ne 0) - { - return "@"; + # standard return + if ($out->{"exit"} eq "0") { + my $stdout = $out->{"stdout"}; + my ($ret, $rest) = split ("\n", $stdout, 2); + + return $ret; + # fallback + } else { + my $hostname = SCR->Read (".target.string", "/etc/HOSTNAME"); + my ($ret, $rest) = split ("\n", $hostname, 2); + y2warning ("Using fallback hostname: ".$ret); + + return $ret; } - my $stdout = $out->{"stdout"}; - my ($ret, $rest) = split ("\n", $stdout, 2); - return $ret; } BEGIN { $TYPEINFO{AbsoluteZoneFileName} = ["function", "string", "string" ]; } @@ -129,7 +136,11 @@ sub GetDefaultSOA { my $self = shift; - my $fqdn = $self->GetFQDN (); + my $fqdn = $self->GetFQDN(); + if ($fqdn eq "") { + $fqdn = "linux.site"; + } + $fqdn = "$fqdn."; my $adm_mail = "root.$fqdn"; my %soa = ( -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org