[yast-commit] r50535 - /trunk/network/src/clients/save_network.ycp
Author: kmachalkova Date: Mon Sep 1 18:30:52 2008 New Revision: 50535 URL: http://svn.opensuse.org/viewcvs/yast?rev=50535&view=rev Log: Do not write /etc/resolv.conf directly, feed the data to sysconfing and let netconfig do the job (FaTE #303618) Modified: trunk/network/src/clients/save_network.ycp Modified: trunk/network/src/clients/save_network.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/clients/save_network.ycp?rev=50535&r1=50534&r2=50535&view=diff ============================================================================== --- trunk/network/src/clients/save_network.ycp (original) +++ trunk/network/src/clients/save_network.ycp Mon Sep 1 18:30:52 2008 @@ -315,17 +315,21 @@ y2warning("No routing information in install.inf"); // create resolv.conf only for static configuration - if (size(InstallInf["nameserver"]:"")>0){ - string text = ""; + if (size(InstallInf["nameserver"]:"")>0) + { + //Do not write /etc/resolv.conf directly, feed the data to sysconfig instead, + //'netconfig' will do the job later on network startup (FaTE #303618) + SCR::Write(.sysconfig.network.config.NETCONFIG_DNS_STATIC_SERVERS, InstallInf["nameserver"]:""); + y2milestone("Writing static nameserver entry: %1", InstallInf["nameserver"]:""); //Enter search domain data only if present if( size(InstallInf["domain"]:"") > 0) - text=sformat("search %1\nnameserver %2\n", InstallInf["domain"]:"", InstallInf["nameserver"]:""); - else - //If we don't have search domain data, skip 'search' field, - //do not leave out 'nameserver' completely - #298001 - text = sformat("nameserver %1\n", InstallInf["nameserver"]:""); - y2milestone("Write resolv.conf content: %1", text); - SCR::Write(.target.string, "/etc/resolv.conf", text); + { + SCR::Write(.sysconfig.network.config.NETCONFIG_DNS_STATIC_SEARCHLIST, InstallInf["domain"]:""); + y2milestone("Writing static searchlist entry: %1", InstallInf["domain"]:""); + } + //We're done. It is OK not to touch NETCONFIG_DNS_POLICY now as it is set to 'auto' by default + //and user did not have a chance to modify it up to now + SCR::Write(.sysconfig.network.config, nil); } } -- 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