Author: jsrain Date: Tue Feb 16 17:34:00 2010 New Revision: 60829 URL: http://svn.opensuse.org/viewcvs/yast?rev=60829&view=rev Log: do not write network config files if not changed (fate#308978) Modified: branches/SuSE-Code-11-SP1-Branch/network/VERSION branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes branches/SuSE-Code-11-SP1-Branch/network/src/modules/DNS.ycp Modified: branches/SuSE-Code-11-SP1-Branch/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/VERSION?rev=60829&r1=60828&r2=60829&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/network/VERSION (original) +++ branches/SuSE-Code-11-SP1-Branch/network/VERSION Tue Feb 16 17:34:00 2010 @@ -1 +1 @@ -2.17.120 +2.17.121 Modified: branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes?rev=60829&r1=60828&r2=60829&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes Tue Feb 16 17:34:00 2010 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Feb 16 17:30:15 CET 2010 - jsrain@suse.cz + +- do not write network config files if not changed (fate#308978) +- 2.17.121 + +------------------------------------------------------------------- Tue Feb 9 14:31:42 CET 2010 - mzugec@suse.cz - ipv6: enable/disable both module and sysctl method (bnc#561611) 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=60829&r1=60828&r2=60829&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 Tue Feb 16 17:34:00 2010 @@ -226,9 +226,19 @@ oldhostname = fqhostname; // #49634 - SCR::Write(.sysconfig.network.dhcp.DHCLIENT_SET_HOSTNAME, dhcp_hostname ? "yes" : "no"); - SCR::Write(.sysconfig.network.dhcp.WRITE_HOSTNAME_TO_HOSTS, write_hostname ? "yes" : "no"); - SCR::Write(.sysconfig.network.dhcp, nil); + // ensure that nothing is saved in case old values are the same, as it makes + // rcnetwork reload restart all interfaces (even 'touch /etc/sysconfig/network/dhcp' + // is sufficient) + string tmp1 = (string) SCR::Read(.sysconfig.network.dhcp.DHCLIENT_SET_HOSTNAME); + boolean old_dhcp_hostname = ( tmp1 == "yes"); + string tmp2 = (string) SCR::Read(.sysconfig.network.dhcp.WRITE_HOSTNAME_TO_HOSTS); + boolean old_write_hostname = ( tmp2 == "yes"); + + if (old_dhcp_hostname != dhcp_hostname || old_write_hostname != write_hostname) { + SCR::Write(.sysconfig.network.dhcp.DHCLIENT_SET_HOSTNAME, dhcp_hostname ? "yes" : "no"); + SCR::Write(.sysconfig.network.dhcp.WRITE_HOSTNAME_TO_HOSTS, write_hostname ? "yes" : "no"); + SCR::Write(.sysconfig.network.dhcp, nil); + } y2milestone("Writing configuration"); if(!modified) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org