Skip to content

Commit

Permalink
AutoYaST: another write_hostname regression (bnc#796580)
Browse files Browse the repository at this point in the history
If keep_install_network=true and dns/write_hostname is unspecified,
use the product default (which is false on SLES), thus not writing
127.0.0.2 to /etc/hosts.

(fixing a regression introduced in 2.17.166)
  • Loading branch information
mvidner committed Jan 11, 2013
1 parent 1bbb6bf commit 6d82362
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/clients/lan_auto.ycp
Expand Up @@ -301,11 +301,21 @@ else if(func == "Import") {
// copy the keys/values that are not existing in the XML
// so we merge the inst-sys settings with the XML while XML
// has higher priority
//
// bnc#796580 The problem with this is that due to compatibility with
// older profiles, a missing element may have a different meaning than
// "use what the filesystem/kernel currently uses".
// In particular, a missing write_hostname [1] means
// "use the product default from DVD1/control.xml".
// Other elements may have similar problems,
// to be fixed post-PTF for maintenance.
if (! haskey(param, "dns")) {
param["dns"] = $[];
}
foreach( string key, any value, dns, {
if( ! haskey( param["dns"]:$[], key ) ) {

if( ! haskey( param["dns"]:$[], key )
&& key != "write_hostname" ) { // [1] ^
y2milestone("(dns) taking %1 from inst-sys. Value = %2", key, value);
param["dns",key] = value;
}
Expand Down

0 comments on commit 6d82362

Please sign in to comment.