Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54446 - in /branches/SuSE-Code-11-Branch/ca-management: VERSION package/yast2-ca-management.changes src/ca_mgm_auto.ycp src/ca_mgm_proposal.ycp
  • From: mcalmer@xxxxxxxxxxxxxxxx
  • Date: Wed, 07 Jan 2009 15:51:05 -0000
  • Message-id: <E1LKagT-0006tb-OF@xxxxxxxxxxxxxxxx>
Author: mcalmer
Date: Wed Jan 7 16:51:05 2009
New Revision: 54446

URL: http://svn.opensuse.org/viewcvs/yast?rev=54446&view=rev
Log:
- version 2.17.9
- use Hostname::CurrentFQ() as hostname fallback in proposal.
(bnc#460737)

Modified:
branches/SuSE-Code-11-Branch/ca-management/VERSION

branches/SuSE-Code-11-Branch/ca-management/package/yast2-ca-management.changes
branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_auto.ycp
branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_proposal.ycp

Modified: branches/SuSE-Code-11-Branch/ca-management/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ca-management/VERSION?rev=54446&r1=54445&r2=54446&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/ca-management/VERSION (original)
+++ branches/SuSE-Code-11-Branch/ca-management/VERSION Wed Jan 7 16:51:05 2009
@@ -1 +1 @@
-2.17.8
+2.17.9

Modified:
branches/SuSE-Code-11-Branch/ca-management/package/yast2-ca-management.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ca-management/package/yast2-ca-management.changes?rev=54446&r1=54445&r2=54446&view=diff
==============================================================================
---
branches/SuSE-Code-11-Branch/ca-management/package/yast2-ca-management.changes
(original)
+++
branches/SuSE-Code-11-Branch/ca-management/package/yast2-ca-management.changes
Wed Jan 7 16:51:05 2009
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Jan 7 15:28:27 CET 2009 - mc@xxxxxxx
+
+- version 2.17.9
+- use Hostname::CurrentFQ() as hostname fallback in proposal.
+ (bnc#460737)
+
+-------------------------------------------------------------------
Fri Dec 12 13:19:48 CET 2008 - mc@xxxxxxx

- version 2.17.8

Modified: branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_auto.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_auto.ycp?rev=54446&r1=54445&r2=54446&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_auto.ycp (original)
+++ branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_auto.ycp Wed Jan 7
16:51:05 2009
@@ -28,6 +28,7 @@
import "Users";
import "CaMgm";
import "Summary";
+import "Hostname";

include "ca-management/new_cert_read_write.ycp";
include "ca-management/util.ycp";
@@ -375,18 +376,32 @@
CaMgm::autoYaSTSettings["takeLocalServerName"] =
settings["takeLocalServerName"]:true;
if (settings["takeLocalServerName"]:true )
{
+ map<string,string> host_ips = getHostIPs ();
+ string hostname_bak = "";
+
+ foreach(string key, string value, host_ips, {
+
if(value == "DNS")
+
{
+
hostname_bak = key;
+
}
+
});
+
map retmap = (map) SCR::Execute (.target.bash_output,
"/bin/hostname --long",
$[] );
y2milestone("Hostname :%1", retmap);
- if (retmap["exit"]:0 != 0)
+ if (retmap["exit"]:1 != 0)
{
- ret = false;
+ if(hostname_bak == "")
+ {
+ retmap["stdout"] = Hostname::CurrentFQ();
+ }
+ else
+ {
+ retmap["stdout"] = hostname_bak;
+ }
}
- else
- {
CaMgm::autoYaSTSettings["server_commonName"] =
strip(retmap["stdout"]:"linux.site");
- }
}
else
{
@@ -557,15 +572,31 @@
// create one
if (CaMgm::autoYaSTSettings["takeLocalServerName"]:true)
{
+ map<string,string> host_ips = getHostIPs ();
+ string hostname_bak = "";
+
+ foreach(string key, string value, host_ips, {
+
if(value == "DNS")
+
{
+
hostname_bak = key;
+
}
+
});
+
map retmap = (map) SCR::Execute (.target.bash_output,
- "/bin/hostname --long",
- $[] );
+
"/bin/hostname --long",
+
$[] );

y2milestone("Hostname :%1", retmap);
- if (retmap["exit"]:0 != 0)
+ if (retmap["exit"]:1 != 0)
{
- Report::Error(_("Cannot evaluate the name of the local
machine."));
- success = false;
+ if(hostname_bak == "")
+ {
+ retmap["stdout"] = Hostname::CurrentFQ();
+ }
+ else
+ {
+ retmap["stdout"] = hostname_bak;
+ }
}
CaMgm::prop_server_commonName =
strip(retmap["stdout"]:"linux.site");
}

Modified: branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_proposal.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_proposal.ycp?rev=54446&r1=54445&r2=54446&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_proposal.ycp
(original)
+++ branches/SuSE-Code-11-Branch/ca-management/src/ca_mgm_proposal.ycp Wed Jan
7 16:51:05 2009
@@ -27,6 +27,7 @@
import "Timezone";
import "Users";
import "String";
+ import "Hostname";

include "ca-management/new_cert_read_write.ycp";
include "ca-management/util.ycp";
@@ -70,11 +71,13 @@
{
if(hostname_bak == "")
{
- ret = add( ret, "warning", _("Cannot evaluate
the name of the local machine. Change the values of Server Name and E-Mail."));
- ret = add( ret, "warning_level", `blocker );
+ retmap["stdout"] = Hostname::CurrentFQ();

- // setting dummy
- retmap["stdout"] = "linux.site";
+ if(retmap["stdout"]:"linux.site" ==
"linux.site")
+ {
+ ret = add( ret, "warning", _("Cannot
evaluate the name of the local machine. Change the values of Server Name and
E-Mail."));
+ ret = add( ret, "warning_level",
`blocker );
+ }
}
else
{
@@ -82,12 +85,12 @@
}
}

- string longhostname = strip(retmap["stdout"]:"linux.site");
+ string longhostname = strip(retmap["stdout"]:"");
if ( longhostname == nil ) longhostname = ""; // (bnc#428101)

if(size(longhostname) <= 0)
{
- longhostname = "linux.site";
+ longhostname = Hostname::CurrentFQ();
}
string hostname = ((list<string>) splitstring (longhostname,
"."))[0]:"";
if ( hostname == nil ) hostname = ""; // (bnc#428101)

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages