[yast-commit] r60556 - in /trunk/network/src: installation/inst_hostname.ycp lan/complex.ycp lan/help.ycp modules/DNS.ycp modules/Lan.ycp services/dns.ycp
![](https://seccdn.libravatar.org/avatar/d95f774280866d45941b1365718208ff.jpg?s=120&d=mm&r=g)
Author: kmachalkova Date: Wed Jan 27 15:21:30 2010 New Revision: 60556 URL: http://svn.opensuse.org/viewcvs/yast?rev=60556&view=rev Log: Fixes of bnc#439235, bnc#510228 & co. (from SLE11 SP1) Modified: trunk/network/src/installation/inst_hostname.ycp trunk/network/src/lan/complex.ycp trunk/network/src/lan/help.ycp trunk/network/src/modules/DNS.ycp trunk/network/src/modules/Lan.ycp trunk/network/src/services/dns.ycp Modified: trunk/network/src/installation/inst_hostname.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/installation/inst_hostname.ycp?rev=60556&r1=60555&r2=60556&view=diff ============================================================================== --- trunk/network/src/installation/inst_hostname.ycp (original) +++ trunk/network/src/installation/inst_hostname.ycp Wed Jan 27 15:21:30 2010 @@ -59,7 +59,10 @@ { // do not let Lan override us, #152218 DNS::proposal_valid = true; - DNS::Write (); // handles NetworkConfig too + + // delay writing, write along with the rest of network configuration + // in lan_proposal + // DNS::Write (); } return ret; Modified: trunk/network/src/lan/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/complex.ycp?rev=60556&r1=60555&r2=60556&view=diff ============================================================================== --- trunk/network/src/lan/complex.ycp (original) +++ trunk/network/src/lan/complex.ycp Wed Jan 27 15:21:30 2010 @@ -38,16 +38,6 @@ /** - * Return a modification status - * @return true if data was modified - */ -define boolean Modified() ``{ - boolean ret = LanItems::Modified() || DNS::modified || Routing::Modified() || - NetworkConfig::Modified(); - return ret; -} - -/** * Commit changes to internal structures * @return always `next */ @@ -60,9 +50,9 @@ * Display finished popup * @return dialog result */ -define symbol FinishDialog() ``{ +/*define symbol FinishDialog() ``{ return FinishPopup(Modified(), "lan", "", "mail", ["permanent"]); -} +}*/ /** * Read settings dialog @@ -101,7 +91,7 @@ define symbol WriteDialog() ``{ ScreenName("lan-write"); - if(!Modified()) return `next; + if(!Lan::Modified()) return `next; LanItems::SetModified(); Wizard::RestoreHelp(help["write"]:""); Modified: trunk/network/src/lan/help.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/help.ycp?rev=60556&r1=60555&r2=60556&view=diff ============================================================================== --- trunk/network/src/lan/help.ycp (original) +++ trunk/network/src/lan/help.ycp Wed Jan 27 15:21:30 2010 @@ -94,12 +94,11 @@ different hostnames.</p> "), "write_hostname": -_("<p>Your hostname will be written to <tt>/etc/hosts</tt> and will be -resolvable as <tt>127.0.0.2</tt> IP address. To disable this modification, -uncheck <b>Write Hostname to /etc/hosts</b> box. In that case your -hostname will not be resolvable without an active network. -</p> -"), +_("<p><b>Assign Hostname to Loopback IP</b> associates your hostname with +<tt>127.0.0.2</tt> (loopback) IP address in <tt>/etc/hosts</tt>. This is an +useful option if you want to have the hostname resolvable at all times, even +without active network. In all other cases, use it carefully, especially +if this computer provides some network services.</p>"), "searchlist_s": _("<p>Enter the name servers and domain search list for resolving Modified: trunk/network/src/modules/DNS.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/DNS.ycp?rev=60556&r1=60555&r2=60556&view=diff ============================================================================== --- trunk/network/src/modules/DNS.ycp (original) +++ trunk/network/src/modules/DNS.ycp Wed Jan 27 15:21:30 2010 @@ -70,7 +70,7 @@ if (ns == "" || ns == nil) return false; nameservers = [ ns ]; - modified = true; + //modified = true; return true; } @@ -85,7 +85,7 @@ return false; hostname = hn; domain = dn; - modified = true; + //modified = true; return true; } Modified: trunk/network/src/modules/Lan.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/Lan.ycp?rev=60556&r1=60555&r2=60556&view=diff ============================================================================== --- trunk/network/src/modules/Lan.ycp (original) +++ trunk/network/src/modules/Lan.ycp Wed Jan 27 15:21:30 2010 @@ -89,7 +89,17 @@ /*------------------*/ /* GLOBAL FUNCTIONS */ +/*------------------*/ +/** + * Return a modification status + * @return true if data was modified + */ +global boolean Modified() { + boolean ret = LanItems::Modified() || DNS::modified || Routing::Modified() || + NetworkConfig::Modified(); + return ret; +} // function for use from autoinstallation (Fate #301032) global define boolean isAnyInterfaceDown(){ @@ -344,8 +354,10 @@ y2milestone("Writing configuration"); - /* Stop the detection */ - if(!LanItems::modified) { + // Query modified flag in all components, not just LanItems - DNS, + // Routing, NetworkConfig too in order not to discard changes made + // outside LanItems (bnc#439235) + if(!Modified()) { y2milestone("No changes to network setup -> nothing to write"); return true; } @@ -396,7 +408,8 @@ if(Abort()) return false; /* Progress step 3 - multiple devices may be present, really plural*/ ProgressNextStage(_("Writing device configuration...")); - if (!Mode::autoinst()) LanItems::WriteUdevDriverRules(); + if (!Mode::autoinst()) + LanItems::WriteUdevDriverRules(); NetworkInterfaces::Write("netcard"); // WriteDevices(); sleep(sl); Modified: trunk/network/src/services/dns.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/services/dns.ycp?rev=60556&r1=60555&r2=60556&view=diff ============================================================================== --- trunk/network/src/services/dns.ycp (original) +++ trunk/network/src/services/dns.ycp Wed Jan 27 15:21:30 2010 @@ -47,6 +47,11 @@ boolean resolver_modifiable = false; /** + * original setup, used to determine whether data have been modified + */ +map settings_orig = $[]; + +/** * CWM buffer for both dialogs. Note that NAMESERVERS and SEARCHLIST * are lists and their widgets are suffixed. */ @@ -87,6 +92,8 @@ settings["NAMESERVER_2"] = DNS::nameservers[1]:""; settings["NAMESERVER_3"] = DNS::nameservers[2]:""; + settings_orig = settings; + return settings; } @@ -94,6 +101,7 @@ * @param settings map of settings to be stored to DNS:: */ define void StoreSettings (map settings) { + list<string> nameservers = [ settings["NAMESERVER_1"]:"", settings["NAMESERVER_2"]:"", @@ -110,8 +118,8 @@ DNS::write_hostname = settings["WRITE_HOSTNAME"]:true; /* update modified flag */ - DNS::modified = true; - y2milestone("modified DNS"); + DNS::modified = DNS::modified || (settings != settings_orig); + y2milestone("Modified DNS: %1", DNS::modified ); } /** @@ -332,6 +340,7 @@ has_dhcp = Lan::AnyDHCPDevice (); hn_settings = InitSettings (); + foreach(string key, (list<string>)Map::Keys(hn_settings),{ InitHnWidget(key); }); @@ -401,7 +410,7 @@ "WRITE_HOSTNAME": $[ "widget": `checkbox, /* checkbox label */ - "label": _("&Write Hostname to /etc/hosts"), + "label": _("&Assign Hostname to Loopback IP"), "opt": [], // help "help": help["write_hostname"]:"", -- 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