[yast-commit] r59593 - in /branches/SuSE-Code-11-SP1-Branch/network/src: installation/inst_hostname.ycp modules/DNS.ycp
![](https://seccdn.libravatar.org/avatar/d95f774280866d45941b1365718208ff.jpg?s=120&d=mm&r=g)
Author: kmachalkova Date: Wed Nov 18 17:23:22 2009 New Revision: 59593 URL: http://svn.opensuse.org/viewcvs/yast?rev=59593&view=rev Log: Initialize inst_hostname values only once Modified: branches/SuSE-Code-11-SP1-Branch/network/src/installation/inst_hostname.ycp branches/SuSE-Code-11-SP1-Branch/network/src/modules/DNS.ycp Modified: branches/SuSE-Code-11-SP1-Branch/network/src/installation/inst_hostname.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/installation/inst_hostname.ycp?rev=59593&r1=59592&r2=59593&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/network/src/installation/inst_hostname.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/network/src/installation/inst_hostname.ycp Wed Nov 18 17:23:22 2009 @@ -27,25 +27,19 @@ //if(GetInstArgs::going_back()) // return `auto; +// only once, do not re-propose if user gets back to this dialog from +// the previous screen - bnc#438124 +if (!DNS::proposal_valid) { + DNS::Read (); // handles NetworkConfig too + DNS::ProposeHostname(); // generate random hostname, if none known so far -// FaTe#303875: Introduce a switch regarding 127.0.0.2 entry in /etc/hosts -boolean whth = ProductFeatures::GetBooleanFeature ("globals", "write_hostname_to_hosts"); -y2milestone("write_hostname_to_hosts value from control.xml : %1", whth); + // propose settings + DNS::dhcp_hostname = ! Arch::is_laptop (); -DNS::Read (); // handles NetworkConfig too - -if (DNS::hostname == "linux") -{ - srandom (); - DNS::hostname = "linux-" + String::Random (4); // #157107 + // get default value, from control.xml + DNS::write_hostname = DNS::DefaultWriteHostname(); } -// propose settings -DNS::dhcp_hostname = ! Arch::is_laptop (); -// override with setting from control.xml -Host::SetWriteHostname( whth ); -// TODO: policy for proposing a hostname - symbol ret = `next; //No need for interactive UI in automatic configuration 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=59593&r1=59592&r2=59593&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 Wed Nov 18 17:23:22 2009 @@ -111,6 +111,7 @@ } global boolean DefaultWriteHostname() { + // FaTe#303875: Introduce a switch regarding 127.0.0.2 entry in /etc/hosts boolean whth = ProductFeatures::GetBooleanFeature ("globals", "write_hostname_to_hosts"); y2milestone("write_hostname_to_hosts default value: %1", whth); return whth; -- 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