Skip to content

Commit

Permalink
AutoYaST: write /etc/hosts even if keep_install_network=true (bnc#796…
Browse files Browse the repository at this point in the history
…580)

The regression was introduced in SP2 in yast2-network-2.17.166
(2012-01-13) in a fix for bnc#712864.
4f67f62
There, a Lan::Read(`cache) call is added with the intent to merge in the
config provided by linuxrc; it also calls Host::Read, which should
always cache, but wrongly discards the Host::Import'ed data. So a later
Host::Write call thinks there is nothing new to write.
(y2log: "Host.ycp:153 Hosts not modified")

This is an incomplete fix for early testing. It should work
but leaves the code messy: `modified`, `initialized` and
`hosts_init` should all be merged.
  • Loading branch information
mvidner committed Jan 8, 2013
1 parent 5269e4d commit 2ddd185
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/Host.ycp
Expand Up @@ -199,7 +199,8 @@ global define boolean Write() {
* @return true if success
*/
global define boolean Import(map settings) {
modified = true;
modified = true; // trigger Write
initialized = true; // don't let Read discard our data

hosts = eval(settings["hosts"]:$[]);

Expand Down

0 comments on commit 2ddd185

Please sign in to comment.