Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49777 - in /trunk/dns-server: VERSION package/yast2-dns-server.changes src/DnsZones.pm
  • From: locilka@xxxxxxxxxxxxxxxx
  • Date: Wed, 06 Aug 2008 14:05:27 -0000
  • Message-id: <20080806140528.1675329FC3@xxxxxxxxxxxxxxxx>
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@xxxxxxx
+
+- 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@xxxxxxx

- 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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages