[yast-commit] r59666 - in /branches/SuSE-Code-11-SP1-Branch/network/src/modules: DNS.ycp Host.ycp
Author: kmachalkova Date: Fri Nov 20 13:41:25 2009 New Revision: 59666 URL: http://svn.opensuse.org/viewcvs/yast?rev=59666&view=rev Log: comments + removal of dead code Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/DNS.ycp branches/SuSE-Code-11-SP1-Branch/network/src/modules/Host.ycp Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/DNS.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/modules/DNS.ycp?rev=59666&r1=59665&r2=59666&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/network/src/modules/DNS.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/network/src/modules/DNS.ycp Fri Nov 20 13:41:25 2009 @@ -224,14 +224,6 @@ //are defined for each static IP separately in address dialog //FaTE #2202 - //FIXME: move to Host:: - /*if (Host::WriteHostname()) { - //Always add 127.0.0.2 entry to /etc/hosts, otherwise some - //desktop apps may hang, not being able to resolve hostname (#304632) - //empty list [] as third parameter does that - Host::Update(oldhostname, fqhostname, []); - } - Host::Write();*/ oldhostname = fqhostname; // #49634 SCR::Write(.sysconfig.network.dhcp.DHCLIENT_SET_HOSTNAME, dhcp_hostname ? "yes" : "no"); Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/Host.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/modules/Host.ycp?rev=59666&r1=59665&r2=59666&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/network/src/modules/Host.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/network/src/modules/Host.ycp Fri Nov 20 13:41:25 2009 @@ -72,11 +72,17 @@ global void EnsureHostnameResolvable() { string local_ip = "127.0.0.2"; if ( NeedDummyIP() ) { + //Add 127.0.0.2 entry to /etc/hosts,if product default says so + //or user requests it otherwise some desktop apps may hang, + //being unable to resolve hostname (bnc#304632) + string fqhostname = Hostname::MergeFQ( DNS::hostname, DNS::domain); hosts[ local_ip ] = [ fqhostname + " " + DNS::hostname ]; modified = true; } else { + // do not add it if product default says no or if there are some + // static IPs (bnc#469752) if( haskey( hosts, local_ip) ) { hosts[ local_ip] = []; modified = true; @@ -241,19 +247,6 @@ string nick = Hostname::SplitFQ(newhn)[0]:""; string oldnick = Hostname::SplitFQ(oldhn)[0]:""; - /* Add at least one hostname/ip */ - // but do not overload localhost (#46715) - //FIXME: adapt this - /*if (write_hostname) { - if (size(ips) < 1 && nick != "localhost") { - y2milestone("Adding dummy 127.0.0.2 %1 entry", newhn); - // TODO #42102 - hosts["127.0.0.2"] = [ newhn + " " + nick ]; - y2milestone("Hosts: %1", hosts); - return true; - } - }*/ - /* Remove old hostname from hosts */ // list oldhnlist = []; foreach (string ip, list<string> hs, hosts, { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org